ShelveAlarm 方法示例下例为按给定持续时间搁置报警一览对象 AlarmSummaryOCX1 中的报警。 Public Sub ShelveAnAlarm(NodeName As String, TagName As String, ShelveDuration As Long) Dim AppObj As Object Dim PictureObj As Object Dim CurrentObj As Object
nShelveTime = 100 If TypeName(Application) = "CFixApp" Then ' running in the workspace 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 ' Search for alarm ocx control in the display If TypeName(CurrentObj) = "AlarmSummaryOCX" Then If CurrentObj.Name = "AlarmSummaryOCX1" Then CurrentObj.ShelveAlarm NodeName, TagName, ShelveDuration Exit Sub End If End If Next End Sub
|
让 iFIX 帮助您提高效率,降低成本。 |