AddExtensionPrimitive method
- Last UpdatedMar 05, 2026
- 1 minute read
Adds an extension primitive to the object.
Class
IgObject
Syntax
[C#]
void AddExtensionPrimitive(
string ExtensionType,
string ExtensionPrimitiveName,
bool IsObjectExtension
);
[Visual C++]
HRESULT AddExtensionPrimitive(
[in] BSTR ExtensionType,
[in] BSTR ExtensionPrimitiveName,
[in, optional, defaultvalue( -1 )]
VARIANT_BOOL IsObjectExtension
);
Parameters
ExtensionType
Type of extension.
ExtensionPrimitiveName
Name of extension primitive to be added. For an attribute extension primitive, this parameter is the fully qualified name of the attribute being extended. For an object extension primitive, it is the new name specified by user for object extension primitive.
IsObjectExtension
If ExtensionPrimitiveName is the new name specified by the user, this field is set to true (for example, when add script pass is true).
Notes
Depending on the primitive you are adding, you may need to add additional attribute extensions. For example, if you were to add the alarm extension primitive by itself, some attributes associated with the alarm primitive, such as the AlarmCntsBySeverity attribute, are not automatically added. This is not a bug; attribute extensions must be added explicitly by including "analogextension" or "booleanextension" when you call the AddExtensionPrimitive method, for example:
obj.AddExtensionPrimitive("booleanextension", attribute.Key, false);