GetSelectedRowAlarmInfo Method Example
The following example obtains the alarm information (including shelving) for the selected alarm in the Alarm Summary object, AlarmSummaryOCX1. It then displays a message with the Shelve Status and Remaining Duration.
Public Sub HandleGetRowAlarmShelveInfo()
Dim AppObj As Object
Dim PictureObj As Object
Dim CurrentObj As Object
Dim bAck As Boolean
Dim sHandle As String
Dim sArea As String
Dim sDateIn As String
Dim sDateLast As String
Dim sTimeIn As String
Dim sTimeLast As String
Dim sNode As String
Dim sTag As String
Dim sPriority As String
Dim sStatus As String
Dim sDesc As String
Dim sValue As String
Dim sExt1 As String
Dim sExt2 As String
Dim sUser1 As String
Dim sUser2 As String
Dim Shelvable As String
Dim ShelveRemDuration As String
Dim Reserved1 As String
Dim Reserved2 As String
If TypeName(Application) = "CFixApp" Then
Set AppObj = Application
Else
Set AppObj = App
If AppObj Is Nothing Then
Exit Sub
End If
End If
Set PictureObj = AppObj.ActiveDocument
For Each CurrentObj In PictureObj.Page.ContainedObjects
If TypeName(CurrentObj) = "AlarmSummaryOCX" Then
If CurrentObj.Name = "AlarmSummaryOCX1" Then
CurrentObj.GetSelectedRowAlarmInfo bAck, sHandle, sArea, sDateIn, sDateLast, sTimeIn, sTimeLast, sNode, sTag, sPriority, sStatus, sDesc, sValue, sExt1, sExt2, sUser1, sUser2, Shelvable, ShelveRemDuration, Reserved1, Reserved2
MsgBox "Shelvable Status: " & Shelvable
MsgBox "Remaining Duration: " & ShelveRemDuration
End If
End If
Next
End Sub