GetVariableValue method
The GetVariableValue method gets the value of a referenced variable by using the index of the variable.
Syntax
- VBScript
oDCO.VariableName(nIndex subscript as Long) as Variant
- C#
object GetVariableValue(int nIndex)
Applies to
All objects.Arguments
- nIndex
- The index of the variable, the value of which you want to get, where 0 is the first variable.
Returns
Returns an object that contains the value of the variable; returns nothing if there is an error.VBScript example
This example gets the value of the third variable in a field object, and displays the value of the variable in a message box.Dim VarVal
VarVal = objField.VariableValue(2)
msgbox VarVal
Tip: To get the value of a referenced
variable by using the ID (name) of the variable,
use the Variable property property.
C# example
This example gets the value of the 10th variable that is defined on page 1 of the runtime batch.object oVarValue = m_oDCO.FindChild("TM000001").GetVariableValue(9);
Tip: To get the value of a referenced variable by using the ID (name)
of the variable, use the get_Variable method method.