• 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. How to get the dialog box ID for hiDBoxCancel function?

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 144
  • Views 16468
  • 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

How to get the dialog box ID for hiDBoxCancel function?

johntling
johntling over 13 years ago

I wrote this simple code for a dialog box to choose to edit 2 different files or to just cancel the dialog box.  But in order to cancel the dialog box I need to get the dialog box ID.  How do I do that for button 3 in the code under procedure myCallback using the hiDBoxCancel function? Skill UI reference document doesn't talk about how to get the g_dboxID from the hiDBoxCancel call.  I also tried getcurrentwindow function in this case but it doesn't seem to work either. 


procedure( callme()
textmsg = "lefpinconfig.il and lefpinconfig.csv has been generated"
dlogbox = hiDisplayAppDBox(
?name gensym( 'trReminderDialogBox ) ; unique variable
?dboxBanner "genPinConfig"
?dboxText textmsg

;dynamically built callback
;'?callback sprintf( nil "trReminderCB( \"%s\" )" textmsg )
?callback '("myCallback(1)" "myCallback(2)" "myCallback(3)")

; choices: hicWarningDialog hicErrorDialog hicInformationDialog hicMessageDialog hicQuestionDialog hicWorkingDialog
?dialogType hicInformationDialog

?dialogStyle 'modeless
; choices are: Close, CloseHelp, OKCancel, YesNo, YesNoCancel or CloseMore
;?buttonLayout 'Close
?buttonLayout 'UserDefined
?buttons '("Open il" "Open csv" "Cancel")
)
printf("%L\n" dlogbox)
)

procedure( myCallback(button)

when( button == 1 "open il file"
       il_file =  strcat( "/space/" getShellEnvVar("MYHOST") "/" getShellEnvVar("USER") "/" getShellEnvVar("PROJECT") "/"  getShellEnvVar("PROJECT_REV") "/cds_run" "/lefpinconfig.il" )
       printf("Open and edit il file %L\n" il_file)
       edit(eval(il_file))

)
when( button == 2 "open csv file"
       csv_file =  strcat( "/space/" getShellEnvVar("MYHOST") "/" getShellEnvVar("USER") "/" getShellEnvVar("PROJECT") "/"  getShellEnvVar("PROJECT_REV") "/cds_run" "/lefpinconfig.csv" )
       printf("Open and edit csv file %L\n" csv_file)
       edit(eval(csv_file))
)
when( button == 3 "Cancel"
;       hiDBoxCancel(dlogbox)
       hiDBoxCancel(

trReminderDialogBox)
)
)

callme()
  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    It will be stored in a variable with the same name as passed to ?name . Given that in this case you're generating that name with gensym, it will be a unique name. You could use:

    ?name dboxVar=gensym( 'trReminderDialogBox ) ; unique variable

    And then symeval(dboxVar) would give you the data structure for the dialog box. Often there is no need to have a unique variable, because if the dialog box is modal, you can replace the previous definition of the variable (although in that case you wouldn't normally need to get hold of the data structure for the dialog box).

    Andrew

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

    It will be stored in a variable with the same name as passed to ?name . Given that in this case you're generating that name with gensym, it will be a unique name. You could use:

    ?name dboxVar=gensym( 'trReminderDialogBox ) ; unique variable

    And then symeval(dboxVar) would give you the data structure for the dialog box. Often there is no need to have a unique variable, because if the dialog box is modal, you can replace the previous definition of the variable (although in that case you wouldn't normally need to get hold of the data structure for the dialog box).

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Milos91
    Milos91 over 6 years ago in reply to Andrew Beckett

    Hi Andrew,

    I have the same problem. I'm running simulation through SKILL and when finished I want to close ADE and virtuoso, but always getting pop-up dialog box which cause skill code never to finish. Here is my code:

    current_window = hiGetCurrentWindow(); this is ID of ADE window session which I want to close

    procedure(CCScloseWindowNoSave()
       hiEnqueueCmd("hiDBoxCancel(geDBox)") ; here, hiDBoxCancel actually means "No"
       hiCloseWindow(current_window)
    );procedure
    procedure(exit_virtuoso()
      CCScloseWindowNoSave()
      exit()
    );procedure
     sessionid=axlGetWindowSession() 
    axlRunSimulation( ?session sessionid ?callback "exit_virtuoso")

    The thing is that I don't want to save the current session. I want only for simulation to run - finish and close without saving session.

    The problem here is ID of the popup dialog box geDBox which is unbound. How do I get this ID?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to Milos91

    I do sometimes wonder if anybody ever bothers reading the Guidelines for the Custom IC SKILL Forum

    Other than posting on an eight-year old thread, which only has limited relevance to the question being asked, you didn't give any indication of which dialog box you are seeing. I just opened an ADE XL view, made a change, closed it, and then (with the log filter set to show everything, or looking in the CDS.log) observed that the dialog presented was sevblockingDialogBox.

    I then adapted your code to use that dialog box, and tried doing the same and then closing the ADE XL window. The dialog box appeared briefly and then the window closed.

    Andrew.

    • 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