CimObjectList.Item (read-only property)

Retrieve an object by name.
Syntax: Set CimObjectInstance = object.Item ( objectID )
Parameters:
objectID As String - The name of the object to retrieve from the list.
Description: CimObjectList.Item returns a CimObjectInstance by name. Use this method to obtain a CimObjectInstance object for an existing object in the project.

Examples

Dim project As CimProject
Set project = CreateObject("CimProject")
project.OpenLocalProject "d:\classes\classes.gef"
Set objs = project.objects

Dim obj As CimObjectInstance
Set obj = objs.Item("TANK_PID")
obj.Attributes.Set "$DEVICE_ID", "PLC_1"
obj.Attributes.Set "$ADDRESS", "%R100"
obj.Attributes.Set "LOCATION", "Left Tank"