![]() | DIAdem 2017 Help |
![]() | DIAdem 2018 Help |
![]() | DIAdem 2019 Help |
![]() | DIAdem 2020 Help |
![]() | DIAdem 2020 SP1 Help |
Returns the transfer parameter of a user dialog box.
When you call a user dialog box with SudDlgShow, you can transfer a parameter to the dialog box. However if you use SudDlgCreate to generate a non-modal user dialog box, you cannot use the parameter transfer with the GetArgument method.
vGetArgument = Object.GetArgument
Object | Dialog Object with this method |
vGetArgument | Variant Transfer parameter of the dialog box |
![]() |
Note Use a VBS variable that you have declared using Dim, as the transfer parameter. Because this variable is a variant type, it might contain numeric information or text information as a single value, a vector, a matrix, or an object. If you want to transfer an array variable as a parameter, first use Dim to declare the variable as a variant, and then use ReDim to declare the variable as a dynamic array variable. Ensure that an object or a dispatch indicator is transferred as the reference. DIAdem variables are not valid as transfer parameters. |
![]() |
Note If you use VBS classes as transfer parameters, you should create the instance of the class in the script that calls. If you create the class in the dialog box, the class is destroyed when the dialog box closes. |
![]() |
Note If you want to edit the transfer parameter in a script of the user dialog box, assign this parameter to a local variable in the script. At the end of the script, use this variable as the parameter of the SetArgument method, to return a value. DIAdem automatically assigns the return value that you have transferred in the SudDlgShow command, to the transfer parameter. |
The following example uses the oArray transfer parameter to call the user dialog box MyDialog. The dialog box changes the parameter:
Dim oArray Redim oArray (3) oArray(0) = "Transport" oArray(1) = "Parameter to" oArray(2) = "SUD Dialog" Call SudDlgShow("MyDialog","SudParams",oArray) Dim i,sgT : sgT = "" For i = lBound(oArray) To UBound(oArray) sgT = sgT & oArray(i) & vbCrLf Next Call MsgBoxDisp(sgT)
The initialization of the dialog box checks the transfer parameter, returns the contents of the transfer parameter, and then changes the contents:
Sub Dialog_EventInitialize(ByRef This) Dim oDlgParams oDlgParams = This.GetArgument If Not IsEmpty(oDlgParams) And Not isNull(oDlgParams) Then If IsArray(oDlgParams) Then 'read params Dim i,sgT : sgT = "" For i = lBound(oDlgParams) To UBound(oDlgParams) sgT = sgT & oDlgParams(i) & vbCrLf Next Call MsgBoxDisp(sgT) Redim oDlgParams(2) 'and write back params oDlgParams(0) = "... and" oDlgParams(1) = "back" This.SetArgument(oDlgParams) End If End If End Sub
Checking a User Dialog Box Entry | Closing a User Dialog Box with a Script | Creating a Dynamic User Dialog Box | Creating a Non-Modal User Dialog Box | Creating a Procedure in the Script of a User Dialog Box | Creating a User Dialog Box without Linking Variables | Creating a User Dialog Box | Creating an Extended Table | Displaying Graphics in Selection Lists | Enabling Controls | Responding to Cancellation of a User Dialog Box | Responding to User Entries in User Dialog Boxes | Saving and Restoring the Last Dialog Box Position | Saving Control Groups for User Dialog Boxes | Specifying the Default Button | Tabulator Order in a User Dialog Box | Transferring a Parameter to a User Dialog Box | Transferring User Dialog Box Entries to DIAdem | Using a Script to Fill a Selection List | Using Channel Selection Lists | Using Hotkeys in a User Dialog Box | Using the Flex Properties
Checking Dialog Box Entries | Dynamic User Dialog Box | Translating User Dialog Boxes | User Dialog Box for Entering Text and Numbers | User Dialog Box for Sequence Control | User Dialog Box in DIAdem VIEW | User Dialog Box in VIEW for the Calculation of the FFT and Harmonic Frequencies | User Dialog Box with Changing Background Color | User Dialog Box with Curve Preview | User Dialog Box with Extended Table | User Dialog Box with Internet Explorer | User Dialog Box with Scalable Table | User Dialog Box with Selection Lists | User Dialog Box with Selection Lists | User Dialog Box with Subdialog Boxes | User Dialog Box with Tables | User Dialog Box with Tree | Wizard for Tolerance Evaluation
Helpful
Not Helpful