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.
MANCIA: 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;
Fornire un feedback
Hai domande o feedback su questa documentazione? invia il tuo feedback qui.