LogicObject.GetAlias(string)

Returns an
IUANode
C# object that corresponds to the node pointed to by the alias passed in the argument. Access the node to which a known alias points
static IUANode GetAlias(string
aliasName
);

Arguments

aliasName
(string)
The
BrowseName
of the alias.

Returns

IUANode
A C# object that corresponds to the node pointed to by the alias.

Example

The following example shows an API that returns a C# object corresponding to the node pointed to by the alias
Motor
, which
Speed
property value is read and assigned to the
myMotorSpeed
variable.
TIP: The
(MotorType)
cast operator changes the object type returned by the API from
IUANode
to
MotorType
. This is useful if you want to directly access the
Speed
property of
refMotor
.
var refMotor = (MotorType)LogicObject.GetAlias("Motor"); var myMotorSpeed = refMotor.Speed;
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.