PC-DMIS 2022.1 Object Library
SetVariableValue Method
See Also  Send Topic Feedback | See Object Hierarchy Chart
VarName
String value representing a variable.
Value
Variable value representing the new value the variable will take.
PCDLRN ActiveX DLL > PartProgram Object : SetVariableValue Method

Glossary Item Box

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

Copyright © 2022. Hexagon Manufacturing Intelligence – Metrology Software, Inc. All Rights Reserved.