Home > Community > Forums > Custom IC SKILL > Skill script for creating a selactable area

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

 Skill script for creating a selactable area 

Last post Tue, Mar 19 2013 2:47 AM by Andrew Beckett. 11 replies.
Started by RFStuff 10 Mar 2013 10:59 PM. Topic has 11 replies and 1681 views
Page 1 of 1 (12 items)
Sort Posts:
  • Sun, Mar 10 2013 10:59 PM

    • RFStuff
    • Top 25 Contributor
    • Joined on Tue, Feb 5 2013
    • Posts 227
    • Points 3,995
    Skill script for creating a selactable area Reply

     Dear All,

    For selecting an object we use "leSelBoxOrStretch()". This happens automatically if one does a left click on the mouse and releases it. The created virtual rectangular area selects the object inside it. This way it becomes difficult to accurately select the objects as the objects may not be accomodated in the zoomed area.

    So what I actually want is as  follows:-

    I will click ( left click in the mouse)  one point ( this will be let's say one corner of the rectangle), then I will go to other corner of the desired area and click the mouse and will fix the other diagonal corner of the rectangle. Then the objects which arefully coming inder this area will be selected.

    Could anybody please tell, how it can be done.

    Kind Regards,

     

     

    • Post Points: 20
  • Mon, Mar 11 2013 3:27 AM

    Re: Skill script for creating a selactable area Reply

    geSingleSelectBox() does this. It's already in the normal leBindKeys.il sample file bound to shift-A in the layout editor.

    You might also be interested in this solution on Cadence Online Support. It's some SKILL code I wrote to allow you to select by polygon or select by line. The capability is now built-in to IC615, but the code is still useful in earlier releases (including IC5141).

    Kind Regards,

    Andrew.

    • Post Points: 20
  • Mon, Mar 11 2013 10:51 AM

    • RFStuff
    • Top 25 Contributor
    • Joined on Tue, Feb 5 2013
    • Posts 227
    • Points 3,995
    Re: Skill script for creating a selactable area Reply

     Dear Andrew,

    Thanks a lot.

    It looks like I am running out of free bind keys.

    Is it possible to use Alt-"A..1" in stead of Shift to add more bind keys.

    Kind Regards,

     

    • Post Points: 20
  • Mon, Mar 11 2013 3:53 PM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 393
    • Points 7,415
    Re: Skill script for creating a selactable area Reply

    You can use "alt" as a modifier for bindkeys in Cadence 6.1 if you set the following environment variable to nil in your .cdsenv:

    ui      enableMenuShortcuts     boolean nil

    It's hard to run out of bindkeys. You can use several modifiers and combined modifiers:
    None, Shift, Ctrl, Alt, Super (next to alt on most keyboards), CtrlShift, CtrlSuper, CtrlAlt, etc.

    Derek

    • Post Points: 20
  • Mon, Mar 11 2013 4:01 PM

    Re: Skill script for creating a selectable area Reply

    Although I'd generally recommend not disabling menu shortcuts. If this isn't turned off, you can use the underlined key accelerators - e.g. Alt-F-E-C to do a File->Export->CDL in the CIW. It's a useful alternative when you haven't got bindkeys for everything.

    So in the layout editor (in IC615), you can do Alt-e-l-e to do a select by area...

    Andrew.

    • Post Points: 20
  • Sat, Mar 16 2013 5:24 AM

    • RFStuff
    • Top 25 Contributor
    • Joined on Tue, Feb 5 2013
    • Posts 227
    • Points 3,995
    Re: Skill script for creating a selectable area Reply

     Dear Derek and Andrew,

    Thanks a lot for your replies.

    Derek:-

             I tried   ui enableMEnuShortCuts bolean nil in .cdsenv. It did NOT work. I am using IC5141.

    Andrew:-

              1) I could not get your point. What is the effect of File->Export->CDL

              2) Just to know:- For the layout editor, which are the files set the bindKeys.

                 I commented the command load(../sample/local/leBindKey.il") and reinvoked icfb, but still the bindkeys written in that  file are working. Looks like, it is getting the binKey information from some other files.

    Kind Regards,

     

       

            

    • Post Points: 20
  • Sat, Mar 16 2013 8:27 AM

    Re: Skill script for creating a selectable area Reply

    As Derek said, this env var is for IC61. Menu accelerators were introduced in IC61, and the file export CDL was just me showing an example. The reason I was suggesting that you don't start using Alt in your bindkeys in IC5141 because you'll then get used to them and might then end up having to disable menu accelerators once you move to IC61.

    The bindkey I mentioned is in the leBindKeys.il file - so you'll presumably have to track down where your bindkeys are being loaded. 

     Regards,

     Andrew 

     

     

    • Post Points: 20
  • Sat, Mar 16 2013 9:44 AM

    • RFStuff
    • Top 25 Contributor
    • Joined on Tue, Feb 5 2013
    • Posts 227
    • Points 3,995
    Re: Skill script for creating a selectable area Reply

    Dear Andrew,

    Thanks a lot for your reply.

    In 2nd query I was not clear in presenting what I want.

    I have my leBindKeys in two files as written in the .cdsinit file as below:-

    a) load(prependInstallPath("samples/local/leBindKeys.il"))

    b) load("/home/../work_directory/leBindKeys.il")

    I want to use Shift-F5 key for one task. So I added 

    bk("Layout" "Shift<Key>F5"  "CCSprotect->protectSelected()") in my /home/../work_directory/leBindKeys.il file.

    But after reinvoking icfb it turns out that when I press "Shift F5", the command "deOpen()" gets implemented. Then I went to the file " samples/local/leBindKeys.il" and disable the bindkey set for deOpen(). The key F5 was used for this command. After reinvoking Icfb, when I press Shift F5 still the above command gets executed in CIW.

    Is there any other file from where layout editor gets the bindKey information ?

    I wonder why this happening. Could please tel what is the caus.

    Kind Regards,

    • Post Points: 20
  • Mon, Mar 18 2013 6:49 AM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 393
    • Points 7,415
    Re: Skill script for creating a selectable area Reply

    I suggest you add a print statement at the top of each bindkey file to see when they get loaded during your startup. It sounds like the Cadence bindkey file is getting loaded last. At the top of each file, add something like:

    println("In the Cadence defaults")

    println("In my defaults")

    Once you figure this out, adjust the order of when things are loaded.

    Derek

    • Post Points: 20
  • Mon, Mar 18 2013 2:56 PM

    • RFStuff
    • Top 25 Contributor
    • Joined on Tue, Feb 5 2013
    • Posts 227
    • Points 3,995
    Re: Skill script for creating a selectable area Reply

     Dear Derek,

    Thanks a lot for your reply.

    Before trying what you have said, I would like to know from  where  the bindKey files are getting loaded.

    Is it from two places:-

     a)  samples/local/leBindKeys.il

     b)  /home/../work_directory/leBindKeys.il

    Are there anyother places from where leBindKeys.il files get loaded at start-up.

    Could please confirm ?

    Kind Regards,

    • Post Points: 20
  • Mon, Mar 18 2013 3:31 PM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 393
    • Points 7,415
    Re: Skill script for creating a selectable area Reply

    Typically bindkeys are loaded in a .cdsinit file. I suspect your setup is doing the loading of the bindkey files so that is why I suggested the print statements to help you find where it is happening. There may be several different .cdsinit files loaded during your startup, depending on settings in your site setup.loc file. Try searching the documentation for setup.loc to better understand Cadence's file loading process.

    Derek

    • Post Points: 20
  • Tue, Mar 19 2013 2:47 AM

    Re: Skill script for creating a selectable area Reply

    In IC5141 bindkeys are not loaded by default, so they will be being loaded by a .cdsinit file. In IC5141, the .cdsinit file is not controlled by the "Cadence Search File" mechanism (aka "setup.loc") - even in IC61X it isn't unless you choose it to be by defining it as such in the csfLookupConfig file. So in IC5141 the mechanism is that it will look for a .cdsinit file in <ICinstDir>/tools/dfII/local, then the working dir, then the home dir. As soon as it finds a file, it will load it and stop. Frequently people add code in the .cdsinit file to continue looking elsewhere for files to load - so you'll have to see what logic has been applied in the .cdsinit file to find out where it looks.

    In IC615 onwards, bindkeys are loaded by default - but in that case they are loaded using the CSF mechanism, with it finding them by default (unless they exist elsewhere in the setup.loc search locations) in <ICinstDir>/share/cds/setup/dfII/bindkeys . Of course, you can still load them from the .cdsinit if you want - this was to avoid people having to load some bindkeys so that they got some out of the box.

    Regards,

    Andrew.

    • Post Points: 5
Page 1 of 1 (12 items)
Sort Posts:
Started by RFStuff at 10 Mar 2013 10:59 PM. Topic has 11 replies.