Send Topic Feedback | See Object Hierarchy Chart
PC-DMIS 2022.2 Object Library
PCDLRN ActiveX DLL > PartProgram Object : SetVariableValue Method
String value representing a variable.
Variable value representing the new value the variable will take.
SetVariableValue Method
Description
This method sets the value defined in Value for the variable specified by the string in VarName.
Syntax
Visual Basic
Public Function SetVariableValue( _
   ByVal VarName As String, _
   ByVal Value As Variable _
) As Boolean
Parameters
VarName
String value representing a variable.
Value
Variable value representing the new value the variable will take.
Return Type
Boolean value: TRUE if the variable was set, FALSE otherwise.
Remarks
PC-DMIS variables only hold values during execution; at learn time PC-DMIS variables have a value of zero. The GetVariableValue and SetVariableValue methods only change a variable's value during the script's execution. If you want to permanently change a value of a variable inside PC-DMIS, you should use the PutText method instead.
See Also