CimEventList (object)

Contains the properties of a CimEventList Object.
Description: CimEventList is an enumeration of CimEvent objects. The CimEventList is returned from the CimProject.Events property. Existing events can be retrieved and modified and new events can be added to the CimEventList object.

Examples

' Attach to project
Dim project As CimProject
Set project = CreateObject("CimProject")
project.OpenLocalProject "c:\myproject\myproject.gef"
project.dynamicMode = False

Dim eventList As CimEventList
Set eventList = project.Events
' Create a new global event
Dim event1 As CimEvent
Set event1 = CreateObject("CimEvent")
event1.ID = "NEW_EVENT"
event1.Type = CimPointEquals
event1.PointID = "AAA"
event1.PointValue = "4325"
event1.Enabled = True
event1.AlarmOnOverFlow = True
event1.LogErrorOnOverFlow = False
event1.EventExecution = CimSequentialExecution
' Add event to event list
eventList.Add event1
' Retrieve event from event list
Dim event2 As CimEvent
Set event2 = eventList.Item("NEW_EVENT")
event2.Type = CimAlarmGenerated
event2.AlarmID = "ALARM_BLOCK1"
event2.ResourceID = "$SYSTEM"
event2.ClassID = "ABLCK"
' Modify event in the event list
eventList.Modify event2
' Delete event from the event list
eventList.Delete "NEW_EVENT"
' Enumerate through each event in the event list
For Each event1 In eventList
    MsgBox "Event Id =" & event1.ID
Next event1
Properties: Count , Item
Methods: Add , Delete , Modify