CimAlarmClassList.Add (method)

Creates a new alarm class.
Syntax: Set CimAlarmClass = object.Add ( AlarmClassID )
AlarmClassID As String - Name of the new alarm class
Description: CimAlarmClassList.Add returns a new CimAlarmClass object. This is the method to call to create a new item. You must call CimAlarmClass.Save to save the alarm class.


Dim project As CimProject
Set project = CreateObject("CimProject")
project.OpenLocalProject "d:\classes\classes.gef"
Dim alarmClasses As CimAlarmClassList
Dim alarmClass As CimAlarmClass
Set alarmClasses = project.AlarmClasses
Set alarmClass = alarmClasses.Add("NCRIT")
alarmClass.Title = "Turbine alarm class."
alarmClass.Save False