InformationModel.MakeObject(browseName, objectTypeId)
Creates a project object of the type passed in the second argument and returns a corresponding
IUAObject
C# object type.static IUAObject MakeObject(QualifiedNamebrowseName, NodeIdobjectTypeId);
Arguments
- browseName(QualifiedName)
- TheBrowseNameof the new object.
- objectTypeId(NodeId)
- TheNodeIDof 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
NewMotor
object derived from Motor (type)
, searched with the Find
method, and then specified using NodeID:
var motorType = Project.Current.Find("Motor"); var mymotor = InformationModel.MakeObject("NewMotor", motorType.NodeId);
Provide Feedback