Command: SUDDlgShow

DIAdem 2018 Help

Edition Date: June 2018
Part Number: 370858P-01
View Product Info

DOWNLOAD (Windows Only)

DIAdem 2017 Help
DIAdem 2018 Help
DIAdem 2019 Help
DIAdem 2020 Help
DIAdem 2020 SP1 Help

Opens a user dialog box.

ReturnValue = SUDDlgShow(SUDDlgName, SUDFileName, [SUDDlgArgument])

Input Parameters

SUDDlgName Specifies the name of a user dialog box to be displayed.
SUDFileName Specifies the name of a SUD file. By default the SUDFileName variable contains an empty text.
[SUDDlgArgument] Specifies the transfer parameter for a user dialog box. In the SUD editor you use the methods GetArgument and SetArgument to access the transfer parameters. The default value of the SUDDlgArgument variable is NULL.

Return Parameters

ReturnValue Receives the status of a dialog box after you exit the dialog box. The return value is a DlgState type.
Enumeration variable
Enumeration variable with the following selection terms
Script Term Interface Term, Explanation
Clicked OK
Clicked Cancel
Clicked No
Dialog box was not displayed

If you specify the user dialog box without a filename extension, DIAdem first searches for the file with the filename extension .sud and then for the encrypted file with the filename extension .suc.

Note  DIAdem first searches the SCRIPT user folder, then the SCRIPT library folder, and finally the DIAdem program folder for a user dialog box to open.
Note  If you do not specify the SudFileName parameter, you must select the dialog box file with the SUDDefLoad command.
Note  You cannot use the SUDDlgShow command in an EventInitialize event of a user dialog box.
Note  The SUDDlgShow command displays a modal user dialog box. Use the SudDlgCreate command and the method Dialog.Show to display a non-modal dialog box. Refer to Modal and Non-Modal User Dialog Boxes for further information on working with non-modal dialog boxes.
Note  If data is changed, DIAdem always refreshes the Data Portal in user dialog boxes when the script runs. If you disable refreshing, you speed up the script. To do this, use the UIAutoRefreshSet command. Use the UIAutoRefreshSet command at the end of the script to restore the refresh state to its original value.
Dim bRefreshStatus : bRefreshStatus = False 
bRefreshStatus = UiAutoRefreshSet(False)
Call SUDDlgShow("Dialog1","Example.sud")


The following example calls the user dialog box Dialog1 from the Example.SUD file.

If SUDDlgShow("Dialog1","Example.sud") = "IDOk" Then
  Call MsgBoxDisp ("You pressed OK")
End If


Not Helpful