Command: SUDDlgCreateEx
- Updated2024-09-12
- 4 minute(s) read
Command: SUDDlgCreateEx
Command: SUDDlgCreateEx
Generates a non-modal SUD dialog box.
Input Parameters
![]() |
Specifies the name of a user dialog box to be displayed. |
![]() |
Specifies the name of a SUD file. By default the SUDFileName variable contains an empty text. |
![]() |
Specifies the alias name for a user dialog box. |
![]() |
Specifies whether the user dialog box is disabled when other dialog boxes are open or scripts are running. |
Return Parameters
ReturnValue | The return value is a Dialog |
![]() | Note Only set the SUDDlgkeepEnabled variable to True, if other dialog boxes or scripts do not impact the objects used in the dialog box. Otherwise unexpected errors might occur. |
![]() | Note Use the methods Dialog.Show and Dialog.Hide to display and to hide a non-modal user dialog box. Use the methods Dialog.OK and Dialog.Cancel to close the non-modal dialog box. Refer to Modal and Non-Modal User Dialog Boxes for further information on working with non-modal dialog boxes. |
![]() | Note Use the Dialog.Filename variable instead of the AutoActPath variable in a non-modal user dialog box. |
![]() | 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. If you disabled the refresh mode in a non-modal dialog box with the UIAutoRefreshSet command, you must enable the refresh mode with the UIAutoRefreshSet command when the EventTerminate event occurs at the latest. If you used the ScriptStart command to call a script from the non-modal dialog box, DIAdem refreshes the data changes automatically when the script is finished. |
Example
The following example executes the non-modal display of the user dialog box Dlg1 from the MytestDialog.SUD file. DIAdem uses different alias names in order to open these dialog boxes and to change the properties of the displayed dialog boxes. Both dialog boxes can be operated separately because the variable SUDDlgkeepEnabled has the value True.
VBScript | Python |
Dim MyFileName MyFileName = ScriptReadPath & "MyTestDialog.SUD" Dim MyDlg1, MyDlg2 If Nothing is SudNonModalDlgLst("MyDialog1") Then Set MyDlg1 = SUDDlgCreateEx("Dlg1",MyFileName,"MyDialog1",True) MyDlg1.Color = RGB(255, 0, 0) Else MyDlg1.Cancel End If If Nothing is SudNonModalDlgLst("MyDialog2") Then Set MyDlg2 = SUDDlgCreateEx("Dlg1",MyFileName,"MyDialog2",True) MyDlg2.Color = RGB(0, 0, 255) Else MyDlg2.Cancel End if MyDlg1.Show Call MyDlg1.Move (20,20) MyDlg2.Show
Related Topics
Command: ProcessMessages | Command: SUDDlgCreate | Command: SUDNonModalDlgLst | Method: IsValid for Dialog <NonModal> | Modal and Non-Modal User Dialog Boxes | Variable: SUDNonModalDlgCount | Variable: SUDNonModalDlgId