CimPointEnumFieldList.Add (method)

Creates a new field.
Syntax: Set CimPointEnumField = object.Add ( Text, Value, SetpointAllowed )
Parameters:
Text As String - Name of the new Field.
Value As long - The value of the new Field.
SetpointAllowed As Boolean - Can the point be set to this enum value.
Description: CimPointEnumList.Add returns a new CimPointEnum object. This is the method to call to create a new item. You must call CimPointEnum.Save to save the enum field.

Examples

Dim project As CimProject
Set project = CreateObject("CimProject")
project.OpenLocalProject "d:\classes\classes.gef"
Dim pointEnums As CimPointEnumList
Dim pointEnum As CimPointEnum
Dim pointEnumFields As CimPointEnumFieldList
Dim pointEnumField As CimPointEnumField
Set pointEnums = project.PointEnums
Set pointEnum = pointEnums.Add("TurbineStates")
pointEnum.Description = "Turbine operational states."
Set pointEnumFields = pointEnum.Fields
Set pointEnumField = pointEnumFields.Add("Starting", 3, True)
pointEnum.Save False