InformationModel.MakeObjectType<T>(browseName, superTypeId)

Creates a project object type derived from the type indicated in the second argument (supertype) and returns a C# object of the specified
<T>
type.
TIP: At design time, the API functions only if the specified type is a predefined type (contained in the FTOptix modules).
static T MakeObjectType<T>(QualifiedName
browseName
, NodeId
superTypeId
);

Arguments

T
An
IUAObject
C# class that corresponds to the class of the C# object to return.
browseName
(QualifiedName)
The
BrowseName
of the new object.
superTypeId
(NodeId)
The
NodeID
of the type from which the new object is derived.

Returns

T
A C# object that corresponds to the project object created.

Example

The following example shows an API that creates a
NewMotorType
object of the
Motor
type, searched with the
Find
method, and then specified using
NodeID
that returns a
MotorType
C# object:
var supertype = Project.Current.Find("Motor"); var myObj = InformationModel.MakeObjectType<MotorType>("NewMotorType", supertype.NodeId); Owner.Add(myObj);
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.