Factory Talk SE - Me.TagParameters

saeqsae

Member
Join Date
Jul 2019
Location
Concepcion
Posts
45
Hi all, i'm trying to use a combobox on FTV SE.

When i click on an option, is easy to see the value, read, and execute commands. My issue is when i tried to do the same but with parameters. For example, the combobox should show the String Value of my Parameters /P (The #1 = Tag )

I tried using Me.TagParameters.Item (1) but the VBA code return me an error.

Imaged Related

Sin-t-tulo.png


Anyone can help me with this?
 
You're going to have to manually assign the parameters to strings and then load the strings into the ComboBox.
 
Are you using /p or /t? I don’t think it matters. There’s a vba method to grab the parameters passed to the screen
 
TagParameters property
Returns a collection of strings that contains the names of tag parameters that were specified when the display was loaded. If no tag parameters were specified, an empty collection is returned. Read-only. StringList collection.

Syntax

Display.TagParameters

where

Display – is the name of a Display object or an expression that evaluates to a Display object.

Remarks

Tag parameters are specified with the /T or /P command line option.
You cannot add strings to the StringList collection that is returned by this property because it is read-only.
 
Thanks, very helpfull. But unfortunatelly i got some error with the syntax now. I'm pretty sure is a dumb error, but i'm newbie on this (FTV and VisualBasic).

-----CODE-----

Private Sub Display_AnimationStart()

Dim List As StringList
Dim Msg1 As String

Set List = Me.TagParameters
Msj1 = List.Item(1)

ComboBox1.AddItem (Msj1,1) <----- SYNTAX ERROR

End Sub

------END-------

Can you help me with this?
 
Last edited:
First of all Msj1 is not the same as Msg1 it may be just a typo in this thread.
I think it should be: Combobox1.ItemAdd (Msg1) I do not understand the (Msg1,1) normally you only need the variable.
For example ComboBox1.AddItem("123456")
 
Isn't AddItem supposed to be a string?

AddItem is a function to add an item on to the ComboBox.


First of all Msj1 is not the same as Msg1 it may be just a typo in this thread.
I think it should be: Combobox1.ItemAdd (Msg1) I do not understand the (Msg1,1) normally you only need the variable.
For example ComboBox1.AddItem("123456")

You are, right, i realized that too, now the ComboBox it's working. BTW the issue was that you said it, the ComboBox1.AddItem Msg1 is the correct syntax.

Thanks both for your help
 

Similar Topics

I am using Factory Talk view Machine Edition Runtime HMI. I want to configure on button in such way that when i press this button I want to...
Replies
0
Views
24
Hi Guys, Looking for someone well versed in VBA that can either tell me a certain naming convention or point me in the right direction (I'm a...
Replies
0
Views
54
Hi- I am configuring an alarm and event server to display 1 current alarm at a time on a big display. Having a few issues The alarm doesn't...
Replies
0
Views
54
Hi Friends; I have a red Explanation Mark on Factory Talk Directory in Task Bar. Before Update the windows and installation of AutoCad it works...
Replies
2
Views
152
I am trying to enable an external alarm via computer speakers for Factory Talk Network Distributed Edition. I am using Alarm and Events setup. I...
Replies
7
Views
172
Back
Top Bottom