• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Call a function after the user has selected something in...

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 143
  • Views 15427
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Call a function after the user has selected something in the schematic editor

PatrikOsgnach
PatrikOsgnach over 9 years ago

Hello,

I have a simple matter to solve. I would like to have a function called when the user selects something in the schematic editor.
In particular, whenever the user click on a wire, I'd like to call a function f(wire) that does something with the wire label.

How can I do this? I didn't find anything suitable in the function trigger names table.

BTW, is it possible to have a function called when the user closes a tab or clicks on edit->hierarchy->return menu item?

Thank you.

  • Cancel
Parents
  • PatrikOsgnach
    PatrikOsgnach over 9 years ago

    Hello Lawrence,

    thank you, I'll try your solution.

    Essentially I have to do two things:

    1) keep track of a "descent hierarchy". When the user opens the first schematic, push the cell name on a stack. When the user descends into a subcell with the descend command (which opens the cell in a new tab or in the current one), push the name of the cell on the stack. When the user returns (with the return command, with Ctrl+E or by closing the tab), pop the last cell name from the stack.

    I have solved this by using the deRegUserTrigger function to call a function when the schematic editor is opened. If the current cell name is already in the second-from-top position on the stack, it means that the user has returned and I'll just pop the top of the stack. Otherwise, I push the cell name. It works fine, but I was wondering if there is a cleaner solution.

    2) I need to keep an history of clicked wires names (click alone, not click and drag). When the user click on a wire, add the name to the list. When there are 2 names on the list, do some processing and the do what would have been done after an ordinary click

    Best regards,

    Patrik

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • PatrikOsgnach
    PatrikOsgnach over 9 years ago

    Hello Lawrence,

    thank you, I'll try your solution.

    Essentially I have to do two things:

    1) keep track of a "descent hierarchy". When the user opens the first schematic, push the cell name on a stack. When the user descends into a subcell with the descend command (which opens the cell in a new tab or in the current one), push the name of the cell on the stack. When the user returns (with the return command, with Ctrl+E or by closing the tab), pop the last cell name from the stack.

    I have solved this by using the deRegUserTrigger function to call a function when the schematic editor is opened. If the current cell name is already in the second-from-top position on the stack, it means that the user has returned and I'll just pop the top of the stack. Otherwise, I push the cell name. It works fine, but I was wondering if there is a cleaner solution.

    2) I need to keep an history of clicked wires names (click alone, not click and drag). When the user click on a wire, add the name to the list. When there are 2 names on the list, do some processing and the do what would have been done after an ordinary click

    Best regards,

    Patrik

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information