Hi,
I am working on a graphic that will fill a ListView ActiveX control based on a value of a tag. There are 118 tanks that I am looking at, and if the value of a tag equals 7, I want to put it in the list.
I have the "display_animationstart" working, and a "refresh" button with similar script working. My problem is gettubg the "ptagGroup_Change" subroutine to scan automatically. I have gotten this to work for other displays without a problem. I can't find out what I am missing.
Dim WithEvents ptagGroup As TagGroup
--------------------------------------
Private Sub Display_AnimationStart()
Set ptagGroup = CreateTagGroup(Me.AreaName)
ptagGroup.Add("tag1")
.
.
.
ptagGroup.Add("tag118")
ptagGroup.Active = True
if ptagGroup("tag1").Value = 7 Then
ListView1.AddItem("Tank 1")
end if
Exit Sub
End Sub
--------------------------------------
Private Sub ptagGroup_Change(ByVal TagName As StringList)
If ptagGroup("tag1").Value=7 Then
ListView1.AddItem("Tank 1")
EndIf
End Sub
I am working on a graphic that will fill a ListView ActiveX control based on a value of a tag. There are 118 tanks that I am looking at, and if the value of a tag equals 7, I want to put it in the list.
I have the "display_animationstart" working, and a "refresh" button with similar script working. My problem is gettubg the "ptagGroup_Change" subroutine to scan automatically. I have gotten this to work for other displays without a problem. I can't find out what I am missing.
Dim WithEvents ptagGroup As TagGroup
--------------------------------------
Private Sub Display_AnimationStart()
Set ptagGroup = CreateTagGroup(Me.AreaName)
ptagGroup.Add("tag1")
.
.
.
ptagGroup.Add("tag118")
ptagGroup.Active = True
if ptagGroup("tag1").Value = 7 Then
ListView1.AddItem("Tank 1")
end if
Exit Sub
End Sub
--------------------------------------
Private Sub ptagGroup_Change(ByVal TagName As StringList)
If ptagGroup("tag1").Value=7 Then
ListView1.AddItem("Tank 1")
EndIf
End Sub