Home > Community > Forums > Custom IC SKILL > Trigger on Select/Unselect

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Trigger on Select/Unselect 

Last post Fri, Jan 9 2009 11:34 AM by skillUser. 8 replies.
Started by J Wilwert 06 Jan 2009 09:16 AM. Topic has 8 replies and 4490 views
Page 1 of 1 (9 items)
Sort Posts:
  • Tue, Jan 6 2009 9:16 AM

    • J Wilwert
    • Top 200 Contributor
    • Joined on Tue, Jan 6 2009
    • Posts 41
    • Points 625
    Trigger on Select/Unselect Reply

    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 

    • Post Points: 35
  • Tue, Jan 6 2009 9:29 AM

    Re: Trigger on Select/Unselect Reply

     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

    • Post Points: 20
  • Tue, Jan 6 2009 9:46 AM

    • J Wilwert
    • Top 200 Contributor
    • Joined on Tue, Jan 6 2009
    • Posts 41
    • Points 625
    Re: Trigger on Select/Unselect Reply

    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 

    • Post Points: 20
  • Tue, Jan 6 2009 9:56 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,535
    • Points 14,940
    Re: Trigger on Select/Unselect Reply

    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.

    • Post Points: 5
  • Tue, Jan 6 2009 10:19 AM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 386
    • Points 7,290
    Re: Trigger on Select/Unselect Reply

    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

    • Post Points: 20
  • Tue, Jan 6 2009 2:17 PM

    • J Wilwert
    • Top 200 Contributor
    • Joined on Tue, Jan 6 2009
    • Posts 41
    • Points 625
    Re: Trigger on Select/Unselect Reply

    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 

    • Post Points: 20
  • Tue, Jan 6 2009 2:27 PM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 386
    • Points 7,290
    Re: Trigger on Select/Unselect Reply

    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()")

    • Post Points: 20
  • Fri, Jan 9 2009 11:19 AM

    • J Wilwert
    • Top 200 Contributor
    • Joined on Tue, Jan 6 2009
    • Posts 41
    • Points 625
    Re: Trigger on Select/Unselect Reply

    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 

    • Post Points: 20
  • Fri, Jan 9 2009 11:34 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,535
    • Points 14,940
    Re: Trigger on Select/Unselect Reply

    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.

    • Post Points: 5
Page 1 of 1 (9 items)
Sort Posts:
Started by J Wilwert at 06 Jan 2009 09:16 AM. Topic has 8 replies.