• 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. Skill script only working correctly...once

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 144
  • Views 13257
  • 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

Skill script only working correctly...once

custom
custom over 15 years ago

When descending in a schematic a popup window called Descend opens with options "new tab", "current tab", and "new window". I'm trying to make a bindkey that understands that I want the "new tab" option and to OK the form. What I've written so far works but only one time. I get no errors just a 't' result in my CIW. Does anyone know why this is happening? Here is the script:

procedure( schDescendNewTab()
    if( boundp('schDescendForm) then
        if( schDescendForm && schDescendForm->_formName == "Descend" then
            if( schDescendForm->schDescendViewNameField->value
                schDescendForm->schDescendRadioField2->value= "new tab"
            );if
            hiFormDone(schDescendForm)
            );if
       );if
);proc
hiSetBindKey("Schematics" "<Key>j" "schDescendNewTab")

 Is there a better way to write this?

thanks,

Mark

  • Cancel
  • dmay
    dmay over 15 years ago

    This form is an "Options" form, so you shouldn't be running the "hiFormDone" command. Notice that the form doesn't have an OK or Apply button which would run the hiFormDone step. Rather the form displays options for the current command. The settings on the form are "applied" when you complete the "Enter function" (in this case when you select the instance in which you want to descend). In testing this, I found that after using the "j" bindkey, the form maintained thesetting for descending into the new tab. Is this what you meant when you said "it only happens one time"? If you want to be able to switch back to "current tab", you'll need to write a routine that toggles the value.

    The easier way to write code for this particular function is to use the environment variable available for this functionality. Some people may have their Cadence configured to not display that options form by default (CIW->Options->User Preferences->Options Displayed When Command Starts), so you can't depend on this form being open.

    The skill code for setting the value to "new tab" is:
    envSetVal("schematic" "descendCanvasType" 'string "new tab")

    If you always want this functionality, you can set it in your ~/.cdsenv file in this format:
    schematic       descendCanvasType       string  "new tab"

    I hope this helps.

    Derek

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • custom
    custom over 15 years ago
    Hey Derek,
    The Options form I’m looking has an OK button in 6.1.3 version.
    What I can’t figure out is that it does work the very first time then it doesn’t work. I’m still not sure what to do about this.

    I do have the ‘Options Displayed When Command Starts’ to off but I think that only applies to the layout, not schematic.

     Do you have any idea where I need to go from here?

     thanks,
    Mark G.
    • 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