FTView SE VBA - get tag value from parameter

ASF

Lifetime Supporting Member
Join Date
Jun 2012
Location
Australia
Posts
3,907
Hi all,

I've got a popup window in FTView SE which, when called, displays a string and an integer specified by the call parameters. i.e., I press a button, and it runs the command "Display popup_window /T string_tag, int_tag". Then in the popup, the string display connection tag is {#1} and the integer display connection tag is {#2}. That all works fine. But what I want to do is to get the value of whichever integer tag is being displayed, with VBA.

The code I have is:
Code:
Public MyTagGroup As TagGroup
Dim IntegerValue As Tag

Private Sub Display_AnimationStart()

If MyTagGroup Is Nothing Then
    Set MyTagGroup = Application.CreateTagGroup(Me.AreaName, 1000)
    Set IntegerValue = MyTagGroup.Add(Me.TagParameters.Item(2))
End If

But I get the VBA error "Invalid procedure call or argument" on the last line where I'm trying to set the IntegerValue tag to be that tag.

Can anyone give me a little more insight into what this error means in practice, or what the correct syntax should be?

Thanks!
 

Similar Topics

I am running XLReporter (v14) and FTView SE (v11: Distributed Server) on the same computer (Server 2016 Standard). XLReporter is reading data from...
Replies
1
Views
2,731
Hi there, I have been looking in the forums for this and I saw a couple of examples but I still don't understand very well how to create a VBA...
Replies
4
Views
8,899
Hi I'm trying to do the simplest of readings. Read a memorytag in VBA and then show a display if the tag is set. However I get an errormessage...
Replies
3
Views
2,159
Hi Guys, I am having some difficulty getting some VBA to work.My VBA is bad... I want to write a subroutine which takes 2 parameters 1. Value to...
Replies
0
Views
5,625
Hi all, I have an FTView SE application where I'm trying to get one of the clients to display a popup when the PLC turns on a bit. My...
Replies
7
Views
16,281
Back
Top Bottom