Home > Community > Forums > Custom IC SKILL > Help on skill code for unselecting/selcting objects like path/wire, rectangle/polygon etc.

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: *

 Help on skill code for unselecting/selcting objects like path/wire, rectangle/polygon etc. 

Last post Thu, Sep 17 2009 3:36 PM by zeroskills. 23 replies.
Started by zeroskills 14 Sep 2009 11:39 AM. Topic has 23 replies and 5839 views
Page 1 of 2 (24 items) 1 2 Next >
Sort Posts:
  • Mon, Sep 14 2009 11:39 AM

    Help on skill code for unselecting/selcting objects like path/wire, rectangle/polygon etc. Reply

    Hi All,

    First of all, i have no talent doing skill code, i have very very basic knowledge of it. here's my request, and i think it's possible because if did some reseach on it, i just don't know how to do it.

    Problem:

    For example, i have a wire/path and a rectangle/polygon overlapping each other, i would like to select "only" the wire/path and not the rectangle/polygon. it would be nice if there's a skill code that can turn off or on wire/path or rectangle/polygon selection like the instance button on the LSW window.

    So basically i would like to have something like the intance turning on or off selection, like this...

    --->leSetObjectSelectable("inst" t) instance is selectable or

    --->leSetObjectSelectable("inst" nil) instance is unselectable

    But i would like something like this for other objects, like wire/path, rectabgle/polygon etc. not necessarily a button but i would like it to toggle, like "shift+w" to turn it on or off using if statements.

    Thanks in advance, I hope someone could help me. 

     

     

    • Post Points: 35
  • Mon, Sep 14 2009 11:55 AM

    Re: Help on skill code for unselecting/selcting objects like path/wire, rectangle/polygon etc. Reply
    I have some code that does pretty much exactly this. Let me dig it out and post it later (once I have a proper internet connection).

    Regards,

    Andrew
    • Post Points: 20
  • Mon, Sep 14 2009 12:09 PM

    Re: Help on skill code for unselecting/selcting objects like path/wire, rectangle/polygon etc. Reply

    Thanks Andrew ! I'll wait and test it soon.

     

    • Post Points: 20
  • Mon, Sep 14 2009 10:55 PM

    Re: Help on skill code for unselecting/selcting objects like path/wire, rectangle/polygon etc. Reply

    You'll need the two SKILL files below. Make sure that the suffix of each file is kept as in the comment at the top of each, because the first one is SKILL++ (and so needs the ".ils" suffix).

    Here's the first code (the main code):

    /* abShapeSelectionFilter.ils
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Dec 02, 2008 
    Modified   
    By         
    
    Main entry point:
    
    abShapeSelectionFilter()
    
    Brings up form, asking you to choose which type of shape objects
    are selectable.
    
    Written in C syntax to allow ease of modification by those scared
    of LISP ;->
    
    Requires abToggleForm.il and abLeMultiSelectionFilter.ils to
    be loaded first.
    
    ***************************************************
    
    SCCS Info: @(#) abShapeSelectionFilter.ils 12/02/08.16:10:15 1.1
    
    */
    
    importSkillVar(abShapeSelectionFilterForm)
    let(((pathsOK t) (shapesOK t) (textOK t) registered)
        /***************************************************************
        *                                                              *
        *                        (displayForm)                         *
        *                                                              *
        *     Local function, exported as abShapeSelectionFilter()     *
        *   which creates form if not already created, and displays    *
        *                             it.                              *
        *                                                              *
        ***************************************************************/
        defun(displayForm ()
    	unless(boundp('abShapeSelectionFilterForm)
    	    abCreateToggleForm(
    		?name 'abShapeSelectionFilterForm
    		?prompt "Check selectable objects:"
    		?textList '("Paths/Path Segments" "Polygons/Rects" "Text")
    		?callback 'abShapeSelectionFilterCB
    		?formTitle "Filter objects"
    		?buttonLayout 'OKCancelApply
    		?toggleHeight 80
    	    ) ; abCreateToggleForm
    	) ; unless
    	hiDisplayForm(abShapeSelectionFilterForm)
        ) ; defun
    
        /******************************************************************
        *                                                                 *
        *                       (formCallback form)                       *
        *                                                                 *
        *   Local function, exported as abShapeSelectionFilterCB, which   *
        * takes choices from form, and updates lexically scoped variables *
        *    to remember settings - so that the filter() function can     *
        *                         reference them.                         *
        *                                                                 *
        ******************************************************************/
        defun(formCallback (form)
    	let((choices)
    	    choices=abToggleFormGetSelected(form)
    	    pathsOK=shapesOK=textOK=nil
    	    foreach(choice choices
    		case(choice
    		    ("Paths/Path Segments" pathsOK=t)
    		    ("Polygons/Rects" shapesOK=t)
    		    ("Text" textOK=t)
    		)
    	    )
    	    if(!textOK || !shapesOK || !pathsOK then
    		unless(registered
    		    registered=t
    		    abLeRegUserObjectSelectionFilter(
    			"abShapeSelectionFilterFilter"
    		    )
    		)
    	    else
    		when(registered
    		    abLeUnregUserObjectSelectionFilter(
    			"abShapeSelectionFilterFilter"
    		    )
    		)
    		registered=nil
    	    ) ; if 
    	) ; let
        ) ; defun formCallback
    
        /***************************************************************
        *                                                              *
        *                         (filter obj)                         *
        *                                                              *
        *       The actual selection filter. This is exported to       *
        *      abShapeSelectionFilterFilter. Compares the objType      *
        *     of the object with certain values, and then returns      *
        *    the value of the flag where the user has chosen which     *
        *                       are selectable.                        *
        *                                                              *
        ***************************************************************/
        defun(filter (obj)
    	case(obj~>objType
    	    (("path" "pathSeg") pathsOK)
    	    (("rect" "polygon") shapesOK)
    	    (("label" "textDisplay") textOK)
    	    (t t)
    	) ; case
        ) ; defun filter
    
        ;--------------------------------------------------------------------
        ; Export all the functions
        ;--------------------------------------------------------------------
        abShapeSelectionFilter=displayForm
        abShapeSelectionFilterFilter=filter
        abShapeSelectionFilterCB=formCallback
    )
    

    And here's the second (used by the first code):

    /* abToggleForm.il
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Feb 23, 1999 
    Modified   Nov 20, 2008 (comments finally added!)
    By         A.D.Beckett
    
    Functions for creating a variable list of toggles
    with all and none toggles. The list of toggles is
    in a scroll region.
    
    Attempted to make it resizable, but this rather contradicted
    with the scroll region, so left the scroll region in the form 
    instead.
    
    Two main entry functions:
    
    abCreateToggleForm()
    abToggleFormGetSelected()
    
    Example:
    
    procedure(myToggleCB(form)
       printf("Selected Files were:\n")
       pprint(abToggleFormGetSelected(form))
       newline()
    )
    
    hiDisplayForm(
      abCreateToggleForm(
         ?name 'myTogForm
         ?textList getDirFiles("/bin")
         ?prompt "Choose Files"
         ?callback 'myToggleCB
      )
    )
    
    ***************************************************
    
    SCCS Info: @(#) abToggleForm.il 12/02/08.14:12:53 1.3
    
    */
    
    /********************************************************************
    *                                                                   *
    *                abCreateToggleForm(?name s_formName                *
    *              ?textList l_textitems ?prompt t_prompt               *
    *         [?formTitle t_formTitle] [?value b_defaultValue]          *
    * [?yStep x_yStep] [?formWidth x_formWidth] [?xPosition x_position] *
    *          [?toggleHeight x_height] [?toggleWidth x_width]          *
    *                      [?callback s_callback])                      *
    *     [?formType 'options/'nonoptions] [?buttonLayout 'OKCancel]    *
    *                                                                   *
    *      Create a form full of toggle items, with an all or none      *
    *       button. Must provide at least the symbol for the form       *
    *              name, the list of items, and a prompt.               *
    *                                                                   *
    ********************************************************************/
    
    procedure(abCreateToggleForm(@key 
    	(name nil)
    	(formTitle "")
    	(textList nil) 
    	(prompt "") 
    	(value t)
    	(yStep 20) (formWidth 300) 
    	(xPosition 220) (toggleHeight 200) (toggleWidth 250)
    	(callback nil)
    	(formType 'nonoptions)
    	buttonLayout
    	)
        let((toggleList togName (toggleNumber 0)
    	    (yPosition 0) topLabel allButton noneButton
    	    scrollRegion separator form)
    	;----------------------------------------------------------------
    	; delete any existing form
    	;----------------------------------------------------------------
    	when(boundp(name) && symeval(name)
    	    hiFormCancel(symeval(name))
    	    hiDeleteForm(symeval(name)))
    	;----------------------------------------------------------------
    	; Default button layout
    	;----------------------------------------------------------------
    	unless(buttonLayout
    	    buttonLayout=if(formType=='nonoptions 'OKCancel 'HideCancel)
    	    )
    	;----------------------------------------------------------------
    	; create the label at the top of the toggle list
    	;----------------------------------------------------------------
    	topLabel=hiCreateLabel(?name 'label ?labelText prompt)
    	;----------------------------------------------------------------
    	; create the toggles for each entry in the textList
    	;----------------------------------------------------------------
    	toggleList=foreach(mapcar text textList
    	    ;------------------------------------------------------------
    	    ; create the name of the toggle
    	    ;------------------------------------------------------------
    	    togName=concat('toggle ++toggleNumber)
    	    ;------------------------------------------------------------
    	    ; return the first value in the group
    	    ;------------------------------------------------------------
    	    prog1(
    		;--------------------------------------------------------
    		; create the toggle and add it onto the list
    		;--------------------------------------------------------
    		list(
    		    hiCreateBooleanButton(
    			?name togName
    			?buttonText text
    			?callback 
    			sprintf(nil "abToggleFormOtherButtonCB(%s '%s)"
    			name togName)
    			?value value
    			); hiCreateBooleanButton
    		    0:yPosition
    		    toggleWidth:yStep
    		    xPosition
    		    ); list
    		;--------------------------------------------------------
    		; increment the step 
    		;--------------------------------------------------------
    		yPosition=yPosition+yStep
    		); prog1
    	    ); foreach mapcar
    	;----------------------------------------------------------------
    	; add the line and the All and None toggles 
    	;----------------------------------------------------------------
    	separator=hiCreateSeparatorField(?name 'separator)
    	allButton=hiCreateBooleanButton(
    	    ?name 'All
    	    ?buttonText "All"
    	    ?callback sprintf(nil "abToggleFormAllButtonCB(%s)" name)
    	    ?value value
    	    )
    	noneButton=hiCreateBooleanButton(
    	    ?name 'None
    	    ?buttonText "None"
    	    ?callback sprintf(nil "abToggleFormNoneButtonCB(%s)" name)
    	    ?value !value
    	    )
    	;----------------------------------------------------------------
    	; the sroll region itself
    	;----------------------------------------------------------------
    	scrollRegion=hiCreateScrollRegion(
    	    ?name 'scrollRegion
    	    ?fields toggleList
    	    ?borderWidth 0
    	    )
    	;----------------------------------------------------------------
    	; create the form
    	;----------------------------------------------------------------
    	form=hiCreateAppForm(
    	    ?name name
    	    ?fields list(
    		list(topLabel 0:0 formWidth:yStep*2)
    		list(scrollRegion 0:yStep*2 formWidth:toggleHeight)
    		list(separator 0:toggleHeight+yStep*2 formWidth:0)
    		list(allButton 0:toggleHeight+yStep*3 formWidth:yStep xPosition)
    		list(noneButton 0:toggleHeight+yStep*4 formWidth:yStep xPosition)
    		)
    	    ?formTitle formTitle
    	    ?formType formType
    	    ?buttonLayout buttonLayout
    	    ?callback callback
    	    )
    	;----------------------------------------------------------------
    	; store various information on the form
    	;----------------------------------------------------------------
    	form->numButtons=toggleNumber
    	if(value then
    	    form->numSelected=toggleNumber
    	else 
    	    form->numSelected=0
    	    )
    	form
    	))
    
    /***************************************************************
    *                                                              *
    *            abToggleFormOtherButtonCB(form field)             *
    *                                                              *
    *  Callback for each toggle (except all or none) on the form   *
    *                                                              *
    ***************************************************************/
    
    procedure(abToggleFormOtherButtonCB(form field)
        let((numSelected)
    	numSelected=form->numSelected
    	if(get(form->scrollRegion field)->value 
    	    numSelected++
    	    numSelected--)
    	form->numSelected=numSelected
    	form->None->value=numSelected==0
    	form->All->value=numSelected==form->numButtons
        ))
    
    /***************************************************************
    *                                                              *
    *              abToggleFormAllButtons(form value)              *
    *                                                              *
    *    Utility function to set all the buttons to a specified    *
    *                            value.                            *
    *                                                              *
    ***************************************************************/
    
    procedure(abToggleFormAllButtons(form value)
        let(((scrollRegion form->scrollRegion))
    	foreach(field scrollRegion->fieldList
    	    get(scrollRegion field)->value=value
    	    )
        ))
    
    /***************************************************************
    *                                                              *
    *                abToggleFormAllButtonCB(form)                 *
    *                                                              *
    *                 Callback for the All button                  *
    *                                                              *
    ***************************************************************/
    
    procedure(abToggleFormAllButtonCB(form)
        cond(
    	(form->All->value
    	    abToggleFormAllButtons(form t))
    	(form->numSelected==form->numButtons
    	    form->All->value=t)
    	)
        )
    
    /***************************************************************
    *                                                              *
    *                abToggleFormNoneButtonCB(form)                *
    *                                                              *
    *                 Callback for the None button                 *
    *                                                              *
    ***************************************************************/
    
    procedure(abToggleFormNoneButtonCB(form)
        cond(
    	(form->None->value
    	    abToggleFormAllButtons(form nil))
    	(form->numSelected==0
    	    form->None->value=t)
    	)
        )
    
    /***************************************************************
    *                                                              *
    *                abToggleFormGetSelected(form)                 *
    *                                                              *
    *  Function that may be used in the form callback function to  *
    *             retrieve all the selected item names             *
    *                                                              *
    ***************************************************************/
    
    procedure(abToggleFormGetSelected(form)
        let(((scrollRegion form->scrollRegion))
    	foreach(mapcar field
    	    setof(field scrollRegion->fieldList
    		get(scrollRegion field)->value)
    	    get(scrollRegion field)->prompt
    	    )
    	))
    

    Regards,

    Andrew.

    • Post Points: 20
  • Tue, Sep 15 2009 7:12 AM

    Re: Help on skill code for unselecting/selcting objects like path/wire, rectangle/polygon etc. Reply

    Hi Andrew,

    First of all thanks for the code.

    here is what i've done:

    1. i've cut and paste your 2 codes, and load them up on icfb

    - abShapeSelectionFilter.ils
    - abToggleForm.il

    2. when i load abToggleForm.il, here's what it says:

    - function abCreateToggleForm redefined

    - function abToggleFormOtherButtonCB redefined and more, just redefining the others...

    How do i set the binkey to this? and is there anything wrong with it? from what i think should happen is, i've have to load  - abShapeSelectionFilter.ils 1st then the 2nd code - abToggleForm.il to pop up the form, also tried doing the other way around, loading the form then the filter, nothing happens.

     

    Thanks again for the help. 

     

    • Post Points: 20
  • Tue, Sep 15 2009 9:10 AM

    Re: Help on skill code for unselecting/selcting objects like path/wire, rectangle/polygon etc. Reply

    You would need to do this:

    load("abShapeSelectionFilter.ils")
    load("abToggleForm.il")

    and do that once only - this simply loads the code and defines all the functions. You could put these load statements into your .cdsinit.

    Then to actually alter the shape selection filter, you need to use this function (mentioned in the comments at the top of the code):

     abShapeSelectionFilter()

    You could define a bindkey:

    hiSetBindKey("Layout" "Ctrl<Key>s" "abShapeSelectionFilter()")

    Obviously pick whatever key combo you want.

    When you call this function, a form will appear with three choices:

    1. Paths/Path Segments
    2. Polygons/Rects
    3. Text

    And you can individually control the selectability of each of those shape types.

    Best Regards,

    Andrew.

    • Post Points: 20
  • Tue, Sep 15 2009 9:56 AM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 393
    • Points 7,415
    Re: Help on skill code for unselecting/selcting objects like path/wire, rectangle/polygon etc. Reply

    There are a couple of syntax issues in the code. To get it to work, you'll need to fix abShapeSelectionFilter.ils.

    abLeRegUserObjectSelectionFilter should be changed to leRegUserObjectSelectionFilter.

    Likewise:
    abLeUnregUserObjectSelectionFilter should be changed to leUnregUserObjectSelectionFilter AND the argument should be removed.

    Reload the modified abShapeSelectionFilter.ils file and it works like a charm. The leRegUserObjectSelectionFilter is really a pretty slick utility that I begged for from Cadence for years and was finally added in 5.1.41.

    Here is the adjusted code:

         if(!textOK || !shapesOK || !pathsOK then
      unless(registered
          registered=t
          leRegUserObjectSelectionFilter(
       "abShapeSelectionFilterFilter"
          )
      )
         else
      when(registered
          leUnregUserObjectSelectionFilter()
      )
      registered=nil
         ) ; if

    Derek

    • Post Points: 20
  • Tue, Sep 15 2009 10:09 AM

    Re: Help on skill code for unselecting/selcting objects like path/wire, rectangle/polygon etc. Reply

    Derek,

    Er, whoops. Thanks for spotting that. I'd neglected those functions - which are wrappers around leRegUserObjectSelectionFilter. My internal XML file which I use to generate my SKILL Library web page didn't mention the reference to that file (my bad) and so I missed it out.

    Here's the missing code:

    /* abLeMultiSelectionFilter.ils
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Dec 02, 2008 
    Modified   
    By         
    
    A mechanism to allow multiple filters to be registered
    for leRegUserLayerSelectionFilter and leRegUserObjectSelectionFilter
    
    Defines:
    
    abLeRegUserLayerSelectionFilter(t_funcName)
    abLeUnregUserLayerSelectionFilter(t_funcName)
    abLeRegUserObjectSelectionFilter(t_funcName)
    abLeUnregUserObjectSelectionFilter(t_funcName)
    
    These are similar to the original functions with prefix le instead of
    abLe, but note that the original unreg functions don't need a function
    name (this does, because it needs to know which function is
    being unregistered)
    
    ***************************************************
    
    SCCS Info: @(#) abLeMultiSelectionFilter.ils 12/02/08.11:51:17 1.1
    
    */
    
    (let ()
      /******************************************************************
      *                                                                 *
      *    (defineFilterWrapper regFunc unregFunc filterName "uut")     *
      *                                                                 *
      *   Closure which returns a list of three functions - one to be   *
      *   the registration function, one the unregistration function,   *
      *  and one the filter itself. Needs to know the function objects  *
      *   to perform the single registration, unregistration, and the   *
      *              ultimate (global) name of the filter.              *
      *                                                                 *
      *  The idea is that this keeps track of multiple registrations,   *
      *  and then calls all the registered filter functions sequence,   *
      * so turns with a single registered filter function, can actually *
      *                 call several functions instead.                 *
      *                                                                 *
      ******************************************************************/
      (defun defineFilterWrapper (regFunc unregFunc filterName "uut")
        (let (filterList registered)
          ;------------------------------------------------------------------
          ; local function to register the selection filter
          ;------------------------------------------------------------------
          (defun register (func)
    	(when (stringp func) (setq func (stringToSymbol func)))
    	(unless (member func (car filterList))
    	  (setq filterList (tconc filterList func)))
    	(unless registered
    	  (setq registered t)
    	  (regFunc filterName)
    	  )
    	t
    	)
          ;------------------------------------------------------------------
          ; local function to unregister the selection filter
          ;------------------------------------------------------------------
          (defun unregister (func)
    	(when (stringp func) (setq func (stringToSymbol func)))
    	(setq filterList 
    	      (lconc nil (remove func (car filterList))))
    	(unless (car filterList)
    	  (setq registered nil)
    	  (unregFunc)
    	  )
    	t
    	)
          ;------------------------------------------------------------------
          ; local function to actually be the selection filter
          ;------------------------------------------------------------------
          (defun filter (obj)
    	(forall func (car filterList)
    		(funcall func obj))
    	)
          (list register unregister filter)
          )
        )
    
      ;----------------------------------------------------------------------
      ; Use the closure to define the multi-version of 
      ; leRegUserLayerSelectionFilter and leUnregUserSelectionFilter
      ;----------------------------------------------------------------------
      (let (funcs)
        (setq funcs (defineFilterWrapper leRegUserLayerSelectionFilter
    				     leUnregUserLayerSelectionFilter
    				     "abMultiLayerSelectionFilter"))
        (setq abLeRegUserLayerSelectionFilter (car funcs))
        (setq abLeUnregUserLayerSelectionFilter (cadr funcs))
        (setq abMultiLayerSelectionFilter (caddr funcs))
        )
    
      ;----------------------------------------------------------------------
      ; Use the closure to define the multi-version of
      ; leRegUserObjectSelectionFilter and leUnregUserObjectSelectionFilter
      ;----------------------------------------------------------------------
      (let (funcs)
        (setq funcs (defineFilterWrapper leRegUserObjectSelectionFilter
    				     leUnregUserObjectSelectionFilter
    				     "abMultiObjectSelectionFilter"))
        (setq abLeRegUserObjectSelectionFilter (car funcs))
        (setq abLeUnregUserObjectSelectionFilter (cadr funcs))
        (setq abMultiObjectSelectionFilter (caddr funcs))
        )
      t
      )
    
    

    With this code, you can use the original unmodified.

    Regards,

    Andrew.

     

    • Post Points: 20
  • Tue, Sep 15 2009 11:40 AM

    Re: Help on skill code for unselecting/selcting objects like path/wire, rectangle/polygon etc. Reply

    Hi Andrew and Derek,

    So i created the the new file "abLeMultiSelectionFilter.ils" and the  "abToggleForm.il" is still the same.

    i've loaded them up using:

    - load("/user/me/abLeMultiSelectionFilter.ils")

    - load("/user/me/abToggleForm.il") 

    and added this on the my .cdsinit

    - hiSetBindKey("Layout" "Ctrl<Key>7" "abLeMultiSelectionFilter()") and here's the result.

    *Error* eval: undefined function - abLeMultiSelectionFilter 

    <<< Stack Trace >>>

    abLeMultiSelectionFilter()

    ERROR 

    Here's our cadence version:

    cadence 5.10.41.500.6.137 

     

    Again, thanks for your help. 

     

    • Post Points: 20
  • Tue, Sep 15 2009 11:55 AM

    Re: Help on skill code for unselecting/selcting objects like path/wire, rectangle/polygon etc. Reply
    The new file was not a replacement for the original code. It was an additional piece of code which is used by the original abShapeSelectionFilter.ils code, which I'd accidentally omitted.

    You need to load all three files, and then define the bindkey as I'd previously stated - I.e. As "abShapeSelectionFilter()" (I think - I can't check at the moment as I'm writing this from a PDA).

    Regards,

    Andrew
    • Post Points: 20
  • Tue, Sep 15 2009 12:17 PM

    Re: Help on skill code for unselecting/selcting objects like path/wire, rectangle/polygon etc. Reply

    Thanks Andrew.

    The form window is popping now, i can use the button to select or unselect path, rectangle text etc.

    But still,  even if a path (all of them) is "unselected" on the form window, i can still move or stretch it.

    Thanks again, it's getting close now.

     

     

    • Post Points: 20
  • Tue, Sep 15 2009 12:22 PM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 393
    • Points 7,415
    Re: Help on skill code for unselecting/selcting objects like path/wire, rectangle/polygon etc. Reply

    Did you press Apply on the form? I tested the same code and it works as advertised. I cannot select the shapes to stretch or move them.

    Derek

    • Post Points: 20
  • Tue, Sep 15 2009 12:39 PM

    Re: Help on skill code for unselecting/selcting objects like path/wire, rectangle/polygon etc. Reply

    Thanks Andrew and Derek. Yes, it's working. somehow i thought there was bug, it was working then not working. and i think i i got my bindkeys messup because i was "playing" around with another code supposed to be similar to this, that's why my stretch and move command got messed up.

    By the way, is there a way i can use a bindkey for un/selecting path/wire/etc individually, instead of a form window? like this...

    by pressing ctrl+1, i can toggle selecting and unselecting wire

    by pressing ctrl+2, i can toggle selecting and unselecting path

    by pressing ctrl+3, i can toggle selecting and unselecting text

    by pressing ctrl+4, i can toggle selecting all

    by pressing ctrl+5, i can toggle unselecting all

    and to toggle it, it's just using an if statement, right? like if it's selectable then unselect...

     

     

     

    @Andrew, maybe you remebered this code, this was actually in our system, and it was supposed to work the same, "locking" instances or so...

    /************************************************************************** 

    (defun mitDoWithLock (func)
    (foreach fig (geGetSelectedSet)
    (when fig~>lockDown == "TRUE"
    (geDeselectFig fig)))
    (when t
    (funcall func)));end defun


    (defun mitLockDownInstance ()
    (foreach fig (geGetSelectedSet)
    (dbReplaceProp fig "lockDown" "boolean" t))
    (printf "Locked down %d instances\n" (length
    (geGetSelectedSet))));end defun


    (defun mitUnLockDownInstance ()
    (foreach fig (geGetSelectedSet)
    (dbReplaceProp fig "lockDown" "boolean" nil))
    (printf "Unlocked %d instances\n" (length (geGetSelectedSet))));end
    defun


    (hiSetBindKey "Layout" "<Key>s" "(mitDoWithLock 'leHiStretch)")

    (hiSetBindKey "Layout" "<Key>m" "(mitDoWithLock 'leHiMove)")

    (hiSetBindKey "Layout" "<Key>Delete" "(mitDoWithLock 'leHiDelete)")

    (hiSetBindKey "Layout" "Ctrl<Key>l" "(mitLockDownInstance)")

    (hiSetBindKey "Layout" "Ctrl<Key>u" "(mitUnLockDownInstance)")
     

    **************************************************************************************************/ 

    • Post Points: 20
  • Tue, Sep 15 2009 2:06 PM

    Re: Help on skill code for unselecting/selcting objects like path/wire, rectangle/polygon etc. Reply
    I'll check the code and modify if necessary to give a function which can be used procedurally - I'll need to be back home first though - just got off a plane.

    Regards,

    Andrew
    • Post Points: 20
  • Tue, Sep 15 2009 2:19 PM

    Re: Help on skill code for unselecting/selcting objects like path/wire, rectangle/polygon etc. Reply

    Hi Andrew,

    Thank you very much for keeping up with me even with you being busy.  

    • Post Points: 20
Page 1 of 2 (24 items) 1 2 Next >
Sort Posts:
Started by zeroskills at 14 Sep 2009 11:39 AM. Topic has 23 replies.