CimPointEnumFieldList.Item (read-only property)

Gets the point enumeration field by text or value.
Syntax: Set CimPointEnumField = object.Item ( TextOrValue )
TextOrValue As VARIANT - The text or value of the field to get.
Description: CimPointEnumFieldList.Item returns a CimPointEnum by name. Use this method to obtain an existing point enum field.


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 pointEnumField1 As CimPointEnumField
Dim pointEnumField2 As CimPointEnumField
Set pointEnums = project.PointEnums
Set pointEnum = pointEnums.Item("TurbineStates")
Set pointEnumFields = pointEnum.Fields
Set pointEnumField1 = pointEnumFields.Item("Starting")
Set pointEnumField2 = pointEnumFields.Item(3)