• 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. Trigger on Select/Unselect

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 143
  • Views 4302
  • 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

Trigger on Select/Unselect

J Wilwert
J Wilwert over 16 years ago

Hi,

I am new to the concept of triggers and haven't been able to spend a lot of time doing any detailed research - so right to the point.

I want to execute a bit of skill code when an item is selected/deselected.  Can this be done with the use of a trigger?  Is there an other approach which might be better?  Any ideas anyone?

 Many THANKS in advance,

John Wilwert 

  • Cancel
  • Austin CAD Guy
    Austin CAD Guy over 16 years ago

     There are SKILL triggers on select, leRegUserLayerSelectionFilter and leRegUserObjectSelectionFilter which are described in a CDNLive paper from 2006. These commands define a SKILL program which returns a t or nil when anything is selected to select or not select the thing. 

    There is no de-select version of these triggers.

     Ted

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • J Wilwert
    J Wilwert over 16 years ago

    Hi Ted,

    Thanks for the quick response!   I'd like to follow up on this by readiing the CDNLive paper you mentioned.  Can you point me to it? 

    Again, THANKS!

    John Wilwert 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 16 years ago

    Hi John,

    In addition to what Ted has said, you might be able to modify the default bindkey command(s) to replace them with your own versions that do additional things.  For example you might replace the left-mouse-click bindkey ("None<Btn1Down>" in bindkey coding) to call your function which is a wrapper, or to call an additional command (space separated in the t_SKILL_cmd string argument to the hiSetBindKey() function).  Although not quite what you are looking for, take a look at: SourceLink Solution 11244518

    Best regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dmay
    dmay over 16 years ago

    We have used the triggers Ted mentioned in his post as well as a wrapper for the left click bindkey as suggested by Lawrence. For what its worth, here is what we do:

    The wrapper code around the left mouse button will print information to the ciw about the selected item. If it is a rectangle, it will print the layer, width, length and area.  For paths it prints the width, length and layer. For instances it prints the library name, cell name, instance name and xy location. For pcells, various parameter values are printed. This allows a user to get the most commonly used information without having to query the object.

    We registered a skill function with the leRegUserObjectSelectionFilter to determine whether or not an instance should be selectable. We created a user interface to allow designers to lock down cell placements. Once a cell placement is locked, you cannot select that cell (based on the trigger code we wrote). This allows us to significantly reduce those inadvertant cell movements that can wreak havoc on a design before they are discovered. We used to run into problems when routing cells might shift by a small amount and we found out hours later that many connections were mis-aligned. This trigger has saved us many hours of rework.

    Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • J Wilwert
    J Wilwert over 16 years ago

    Hi Guys!

    This is GREAT! This is exactly the direction I am going.  First things first - I'll need to write a wrapper for the left mouse button and that should not be too difficult.  (If any one has any snippets of code to share that would be grerat.)   I want to be very carefull here and not change in any way the current function of the left mouse button.  Derek, I really like your ideas about writing info to the ciw - something I've been wanting to do for a long time.  I'm sure you have seen a positive impact on your productivity and I and wanting to do the same for my group.  From there I'll want to register a skill function to take full advantage of the system's features as you have explained above.

    M-E-G-A  THANKS!!

    John Wilwert 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dmay
    dmay over 16 years ago

    procedure(mySel()
        mouseSingleSelectPt()
        item = car(selectedSet())
        ;your code here ...
        printf("Selected item is a %L\n" item~>objType)
    ); proc

    hiSetBindKey("Layout" "None<Btn1Down>"  "mySel()")
    hiSetBindKey("Schematics" "None<Btn1Down>"  "mySel()")

    OR

    procedure(mySel()
        item = car(selectedSet())
        ;your code here
        printf("Selected item is a %L\n" item~>objType)
    )

    hiSetBindKey("Layout" "None<Btn1Down>" "mouseSingleSelectPt() mySel()")

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • J Wilwert
    J Wilwert over 16 years ago

    Hi,

    Thanks for this bit of code - it quickly headed me off in the right direction!

    Just a quick follow up question -  This works great in selecting a point - how can you make this work with the select area function?

     

    Again, THANK YOU!

    John Wilwert 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 16 years ago

    Hi John,

    I would imagine that you would approach it in a similar way as before, perhaps run additional code after the built-in function:

    hiSetBindKey( "Layout" "<DrawThru1>" "leSelBoxOrStretch() myPostAreaSelFunc()" )

    Is this what you are asking/looking for?  If you wanted to gather the box points yourself, you could do this but you would most likely lose some functionality since the leSelBoxOrStretch() function alows "direct edit" or box selection. Look at enterBox(), to get the box and geSelectArea() to perform an area selection.

    Best regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

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