IUANode.GetVariable(browsePath)

Returns an
IUAVariable
C# object. The returned object corresponds to the first child variable of the node on which the method is invoked. The returned object name corresponds to the argument.
IUAVariable GetVariable(string
browsePath
);

Arguments

browsePath
(string)
Can be either:
  • The
    BrowseName
    of the object
  • The path of the object in the information model, uniquely expressed as a sequence of
    BrowseName
    values separated by
    /

Returns

IUAVariable
A C# Object that matches the requested variable.

Examples

The following examples show a returned C# object that corresponds to the
Speed
variable of the
Motor1
object:
var currentSpeed = Project.Current.GetObject("Motor1").GetVariable("Speed")
var currentSpeed = Project.Current.GetVariable("Motor1/Speed");
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.