• 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. how to add a trigger when open/close a layout view

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 143
  • Views 3247
  • 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

how to add a trigger when open/close a layout view

acom
acom over 5 years ago

For a layout cellview, we are going to add some function before opening the layout view and after closing the cellview.

When we tried to add the trigger before opening the layout view, it means after we double clicking the  cell view in the library manager before the virtuoso show up the layout view .

When we tired to add the trigger after closing the layout view, it means after we clicking the close button in the layout view.

1) For the trigger before opening the layout view , i read the below ticket Andrew posted (https://community.cadence.com/cadence_technology_forums/f/custom-ic-skill/29819/libmanager-edit-trigger-callback/1335387#1335387).Then i tried to write the code like below:


ddRegTrigger("PreObjAccess" 'layoutpreTrigger)

layoutpreTrigger(@optional libName cellName viewName fileName contexID mode)

  if(libName && cellName && viewName then
    printf("libName:%L cellName:%L viewName:%L mode:%L\n" libName cellName viewName mode)
); ** if **

t
); ** let **
); layoutpreTrigger

It printf " libName cellName viewNae mode " when i tried to open the layout.But it also printf the "libName cellName viewName mode" when i tried to close the layout window.That's not what we need.Is there any place i used wrong here?

2) For the trigger after closing the layout view, i have no good idea as so far.Because sometimes we don't make any change on the layout and we needn't save the layout .So i think "dbRegPostSaveTrigger" should not work well here.Do you have any suggestion?

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 5 years ago

    Perhaps you should be using deRegUserTriggers instead? Then for the app and postInstall triggers you'll get an action trigger, which would be when you open or close the window, regardless of the access mode.

    There is no "close" trigger at the database level. There's dbRegPurgeTrigger, but that's only when there are enough closes to remove the data from memory - that won't necessarily happen when you close the window because the design may be open elsewhere (e.g. as part of a higher level layout).

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 5 years ago

    Perhaps you should be using deRegUserTriggers instead? Then for the app and postInstall triggers you'll get an action trigger, which would be when you open or close the window, regardless of the access mode.

    There is no "close" trigger at the database level. There's dbRegPurgeTrigger, but that's only when there are enough closes to remove the data from memory - that won't necessarily happen when you close the window because the design may be open elsewhere (e.g. as part of a higher level layout).

    Andrew.

    • 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