LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

A way to address a cluster's typedef programatically

Solved!
Go to solution

I have a need to extract the labeltext attached to a parent typedef of various front panel clusters. Unfortunately strict type defs don't strictly enforce labeltext for referenced controls. Is there a way to use a front panel control/cluster reference to address the parent typedef programatically? Or is there a way to extract the original/typedef labeltext programatically for a given front panel cluster/control?

0 Kudos
Message 1 of 3
(2,921 Views)
Solution
Accepted by topic author parsec43

I am not sure if i understand correctly. If you typify a cluster, each element has a fixed label. You cannot change element labels in different instances.

That being said, i assume that you talk about the label of the whole cluster (typedef instance). This can be changed, correct.

 

I don't see any purpose to read out the label of the typedef itself, however, it is possible. You have to create a property node of the cluster (instance) and select the property "Typedef VI". using VI Server, you can reference the front panel, read out the controls (which is the typedef cluster itself) and read the label text.

Please note that the first property i mention is part of VI Scripting, so you will only see it if you activate VI Scripting in the LV options.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 3
(2,873 Views)

Thanks. That worked exactly as intended.

 

The reason for desiring this function is, we use the typedef label text to programatically correlate data with our shared variables so that it is easy to dynamically add new data streams to our distributed control system. UI operators have a small amount of Labview knowledge, so are capable of throwing down a typedefed cluster and wiring it up to the encapsulated shared variable read function, but they have a nasty habit of renaming front panel indicators.

0 Kudos
Message 3 of 3
(2,838 Views)