InformationModel.MakeObjectType(browseName, superTypeId)
Creates a project object type derived from the type indicated in the second argument (supertype) and returns a corresponding IUAObjectType C# object.
static IUAObjectType MakeObjectType(QualifiedName browseName, NodeId superTypeId);
Arguments
-
browseName(QualifiedName) - The
BrowseNameof the new object. superTypeId(NodeId)- The
NodeIDof the type from which the new object is derived.
Returns
IUAObject- A C# object that corresponds to the project object created.
Example
The following example shows an API that creates a
SpecialMotor (type) object derived from Motor (type), searched with the Find method, and then specified using NodeID:
var supertype = Project.Current.Find("Motor");
Owner.Add(InformationModel.MakeObjectType("SpecialMotor", supertype.NodeId));
