• 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. Modal Dialog Boxes from within a Skill++ file.

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 143
  • Views 15900
  • 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

Modal Dialog Boxes from within a Skill++ file.

Curtisma
Curtisma over 8 years ago

I am trying to create a modal dialog box using a procedure loaded from a SKILL++ (.ils) file, but it doesn't seem to be modal and the simulation continues to execute before the user makes a selection.  inSkill does not seem to make it modal either.  Can I not have a modal dialog box in SKILL++?  Edit: I also moved it to a Skill (.il) file withourt the inSkill function and it still is not giving me a modal box.  It shows a box both ways but it is not interactive until the rest of the script is complete.

The procedure is:

;dbSkyOpenAdexl
; Opens an Adexl setup database in a new session. If the adexl cellview already exists it is opened in append mode and all elements except history are removed.
; If it does not exist, a new one is created.
;
; USAGE
; dbSkyOpenAdexl(S_libName S_cellName S_viewName)
; INPUTS
; S_libName - library name (string)
; S_cellName - cell name (string)
; S_viewName - view name (string) Usually set to "adexl"
; RETURNS
; A list whose first element is the adxel setup database and the second element is the session. Returns nil if the adexl database cannot be opened.
inSkill(
procedure( ssOpenAdexl(libName cellName viewName "SSS")
let((obj dBoxReplace output ans)
obj=ddGetObj(libName cellName viewName "data.sdb" nil "r")
if(ddIsId(obj) ; == nil
then
importSkillVar( hicQuestionDialog )
ans = hiDisplayAppDBox(?name gensym('dBoxReplace)
?dboxBanner sprintf(nil "Replace %s %s?" cellName viewName)
?dboxText sprintf(nil "Do you you want to update the following ADEXL cellview: \nLibrary: %s\nCell Name: %s\nCell View: %s\n\nYes: The Adexl setup will be updated but simulation history will remain.\n No: The current Adexl cellview will not be changed." libName cellName viewName)
?dialogType hicQuestionDialog
?dialogStyle 'modal
?buttonLayout 'YesNo)
case(ans
((nil) dbClose(obj)
nil)
((t) dbClose(obj)
output=ssOpenAdexlDatabase(libName cellName viewName)))
axlRemoveAll(car(output)) ; Removes all elements except history from the existing database.
else
;dbClose(obj)
; Create a new object since one does not exist
obj=ddGetObj(libName cellName viewName "data.sdb" nil "w")
;dbClose(obj)
ssOpenAdexlDatabase(libName cellName viewName)
); if
) ; let
) ; procedure
) ;inSkill

I am using ic6.1.7 isr12

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    Hi Curtis,

    There is a sort-of allusion to this in the documentation for the modal option for hiDisplayAppDBox. It says:

    Note: The 'modal dialog box cannot be displayed before the initialization--which includes reading the .cdsinit file or other SKILL files--is complete. To delay displaying of the 'modal dialog box until initialization is complete, use hiEnqueueCmd.

    The load() function documentation explains that it repeatedly calls lineread() - which will repeatedly read a complete SKILL form (by form, I mean an "s-expression" rather than a UI form) and then call the evaluator. Any UI function which would otherwise block doesn't cause the evaluator to block - it just is that bit of code that is blocked. The UI itself doesn't block until the load has finished and the UI is responding.

    It's a bit complicated to describe, but the general approach if you want to directly launch a blocking UI within a "script" - i.e. at the top level of a file which you load - is to either use hiEnqueueCmd to defer launching the form until the end, or to surround all the code you're calling in some kind of grouping function - such as {}, let() or prog() and so on. That way it's then a single SKILL form (s-expression) and hence it only calls the evaluator once.

    Whilst SKILL isn't multi-threaded, you can sort-of think of this as being a bit like each call to the evaluator as a file is read causing the code to be evaluated to the point where there is a blocking UI displayed, or to the end of the code if there's no blocking UI. So if you had this in your file being loaded:

    procedure(doodah()
      hiDisplayAppDBox(
        ?name gensym( 'trExampleDialogBox )
        ?dboxBanner "Example"
        ?dboxText sprintf( nil "%L Dialog Type" "hicQuestionDialog")
        ?dialogType hicQuestionDialog
        ?dialogStyle 'modal
      )
      println(6789)
    )

    doodah()
    doodah()
    doodah()
    println(1234)

    If you do that, you'll get three dialog boxes and 1234 when you load the file. Then when you OK or cancel each dialog box, it will print 6789. 

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    Hi Curtis,

    There is a sort-of allusion to this in the documentation for the modal option for hiDisplayAppDBox. It says:

    Note: The 'modal dialog box cannot be displayed before the initialization--which includes reading the .cdsinit file or other SKILL files--is complete. To delay displaying of the 'modal dialog box until initialization is complete, use hiEnqueueCmd.

    The load() function documentation explains that it repeatedly calls lineread() - which will repeatedly read a complete SKILL form (by form, I mean an "s-expression" rather than a UI form) and then call the evaluator. Any UI function which would otherwise block doesn't cause the evaluator to block - it just is that bit of code that is blocked. The UI itself doesn't block until the load has finished and the UI is responding.

    It's a bit complicated to describe, but the general approach if you want to directly launch a blocking UI within a "script" - i.e. at the top level of a file which you load - is to either use hiEnqueueCmd to defer launching the form until the end, or to surround all the code you're calling in some kind of grouping function - such as {}, let() or prog() and so on. That way it's then a single SKILL form (s-expression) and hence it only calls the evaluator once.

    Whilst SKILL isn't multi-threaded, you can sort-of think of this as being a bit like each call to the evaluator as a file is read causing the code to be evaluated to the point where there is a blocking UI displayed, or to the end of the code if there's no blocking UI. So if you had this in your file being loaded:

    procedure(doodah()
      hiDisplayAppDBox(
        ?name gensym( 'trExampleDialogBox )
        ?dboxBanner "Example"
        ?dboxText sprintf( nil "%L Dialog Type" "hicQuestionDialog")
        ?dialogType hicQuestionDialog
        ?dialogStyle 'modal
      )
      println(6789)
    )

    doodah()
    doodah()
    doodah()
    println(1234)

    If you do that, you'll get three dialog boxes and 1234 when you load the file. Then when you OK or cancel each dialog box, it will print 6789. 

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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