Class CustomProjectObject
Base class for custom ProjectObject derived classes.
Inherited Members
Namespace: ABB.Robotics.RobotStudio
Assembly: ABB.Robotics.RobotStudio.dll
Syntax
sistent("CustomProjectObject")]
public abstract class CustomProjectObject : ProjectObject
Remarks
In order for persistence to work properly, the static RegisterType() method must be called once for each derived type. Any persistent and/or undoable data should be stored in the Attributes collection. Call the SetParent() method to make the object part of an existing station.
Constructors
CustomProjectObject()
Initializes a new instance of the CustomProjectObject class.
Declaration
protected CustomProjectObject()
CustomProjectObject(LoadContext)
Constructor called when the object is created by the persistence system.
Declaration
protected CustomProjectObject(LoadContext ctx)
Parameters
Type | Name | Description |
---|---|---|
LoadContext | ctx | The context (document) into which the object is loaded. |
Methods
AfterLoad(PimDocument)
Declaration
protected sealed override void AfterLoad(PimDocument doc)
Parameters
Type | Name | Description |
---|---|---|
RobotStudio.API.Persistence.PimDocument | doc |
Overrides
RegisterType(String, Type)
Registers a CustomProjectObject type for persistence.
Declaration
public static void RegisterType(string id, Type type)
Parameters
Type | Name | Description |
---|---|---|
String | id | A string that uniquely identifies the type. |
Type | type | The type derived from CustomProjectObject to register. |
RegisterType<T>(String)
Registers a CustomProjectObject type for persistence.
Declaration
public static void RegisterType<T>(string id)
Parameters
Type | Name | Description |
---|---|---|
String | id | A string that uniquely identifies the type. |
Type Parameters
Name | Description |
---|---|
T | The type derived from CustomProjectObject to register. |