AlarmItem

 

Remarks Properties Methods Samples

ED
not used
RT
avaliable

Remarks:Top

The object AlarmItem contains information on an alarm. The different objects AlarmItem can be accessed with the method Alarm of the current project. The returned object contains the collection AlarmItems, where the single alarms are listed. If the object Alarm was defined with WithEvents, the events for received/cleared/acknowledged alarms are executed. Each of these events gets an object AlarmItem as a parameter.

Properties:Top

AlarmClass AlarmGroup Computer
Countreactivated Name Parent
Projectname Status Statusreactivated
Tagname Text TimeAcknowledged
Timecomes Timegoes Timereactivated
User Usertext Value

Methods:Top

Acknowledge Delete DynPropertiesEnum[GET]
DynProperties[GET] DynProperties[PUT] Variable

Samples:Top

Public Sub GetAlarmItems()
	Dim zAML As Alarm
	Dim zAML_Items As AlarmItems
	Dim zAML_Item As AlarmItem
	Dim i As Integer

	'set alarm objects
	Set zAML = thisProject.Alarm
	Set zAML_Items = zAML.AlarmItems("*")

	'get text of active alarms...
	For i = 0 To zAML_Items.Count - 1
		Set zAML_Item = zAML_Items.Item(i)
		Call PrintAlarm(zAML_Item)
	Next i
End Sub

Sub PrintAlarm(YourAlarmItem As AlarmItem)
	'this procedure will print out a set of informations
	'depending to the given AlarmItem...
	Debug.Print "TimeComes	 : " & YourAlarmItem.Timecomes
	Debug.Print "TimeGoes		: " & YourAlarmItem.Timegoes
	Debug.Print "TimeAcknowledged: " & YourAlarmItem.TimeAcknowledged
	Debug.Print "Text			: " & YourAlarmItem.Text
	Debug.Print "Variable		: " & YourAlarmItem.Variable.Name
	Debug.Print "Value		 : " & YourAlarmItem.Value
End Sub