• 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. Finding the current form ID using SKILL

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 143
  • Views 10208
  • 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

Finding the current form ID using SKILL

jaleco
jaleco over 2 years ago

I am using SKILL to modify a form's field content, but cannot find how to get a new form's ID.

hiGetCurrentForm() returns the most recent form the cursor was in - not the form ID of a newly opened form.

How would you get the form ID of a newly opened form?

  • Cancel
Parents
  • jaleco
    jaleco over 2 years ago

    For more context, I am using the deFileOpen() function to open the "Open File" form, and trying to get the form ID.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • jaleco
    jaleco over 2 years ago

    For more context, I am using the deFileOpen() function to open the "Open File" form, and trying to get the form ID.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • jaleco
    jaleco over 2 years ago in reply to jaleco

    Since this post is specifically about SKILL code for using the "Open File" form, I did find the symbol for the form to be deOpenForm, which can be used to modify the form field values.

    However, I am unable to find a means of executing the form callback.

    The only thing that works is executing "deFileOpen()" in SKILL, and then typing into the CIW : "hiFormDone(deOpenForm)", which is worse than just clicking on the "OK" button on the form once it is open.

    It is not necessary to open the form is there is a means of pre-loading the fields, and executing the form callback.

    hiFormDone(deOpenForm) does not work

    hiFormClose(deOpenForm) does not work

    deOpenFormCB() does not work

    Any insights would be appreciated.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to jaleco

    Well, the first thing to say is that if you don't want the form, simply use the right function in the first place. If you call the deOpen() function with sufficient information in the arguments (see the documentation), it will open the design in an editor without showing the form at all; no messing around with calling form callbacks, it will just work.

    However, hiGetCurrentForm() does work with this form. hiFormDone also works with this form (I just tried it). Calling the callback function alone is not sufficient, because the actual action is performed by the code (within deOpen) that opens the form - the call-back does some data validation and computation, but the real work to open the design is done by deOpen not the callback. So even using hiFormDone relies on the form having been displayed by deOpen - you can't try to bypass that (or if you do, it won't work).

    Which brings us back to my original suggestion - use deOpen() with the right information passed to it, and then the design will open with no need to interact with a form.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • jaleco
    jaleco over 2 years ago in reply to Andrew Beckett

    Thank you Andrew.

    Here is some sample SKILL code :

    **********************************************

    deOpenForm~>deLibName~>value="myLib"

    deOpenForm~>deCellName~>value="myCell"

    deFileOpen() ; form opens with pre-loaded values

    hiFormDone(deOpenForm) ; does not close form

    hiFormClose(deOpenForm) ; does not close form

    ***************************************************

    command line entry in CIW does close the form, but the SKILL code does not close the open form.

    If I have a different editing form open and the cursor had been in it prior to calling deFileOpen(), hiGetCurrentForm() does not contain the newly opened "Open File" form - it retains the previously most recently active form.

    This is consistent with the function description.

    hiGetCurrentForm() only gives me the "Open File" form data if that was the previous form used.

    One detail I want to accomplish by using the form is the windowStyle of "new tab" in an existing window.

    I cannot figure out how to get a new tab by using deOpen().

    Using deOpen() as a workaround to the forrm, I can get either a new window, or clobber the open window - but not a new tab.

    If you have some sample code to illustrate how to open a new cell view in a new tab of the current window, that would help greatly.

    Thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to jaleco

    OK, that's because deFileOpen() has a blocking UI. So the hiFormDone() won't get called until deFileOpen returns, which it won't do until you've OK'd or cancelled the form. You could mess around with using hiEnqueueCmd("hiFormDone(deOpenForm)") before calling deFileOpen, but as I said, avoiding the form altogether makes sense.

    For opening in a new tab, you need to pass a session window (as described in the documentation). This will do it:

    lib="opamp090"
    cell="adc_sample_hold"
    view="layoutTry"
    deOpen(`(nil libName ,lib cellName ,cell viewName ,view) nil "r" "" hiGetSessionWindow(hiGetCurrentWindow()))

    The backquotes and commas are just a convenient way of creating the fileSpec list (it is a quoted list, except the bits preceded by commas). If you're not sure about that, you can use this instead:

    deOpen(list(nil 'libName lib 'cellName cell 'viewName view) nil "r" "" hiGetSessionWindow(hiGetCurrentWindow()))

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • jaleco
    jaleco over 2 years ago in reply to Andrew Beckett

    Excellent - thank you that worked.

    I have tried countless variations of the arguments to deOpen() and could not get this right or understand why it didn't.

    • 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