LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get names from cluster variables

Solved!
Go to solution

I have a cluster with a number of numeric variables which are bundled by names. The names and their associated values are now to be provided to a TDMS-file header via the "TDMS Set Properties" VI. This VI demands the names and values to be separated to the "Property names" and "Property values" inputs. My question is how to get the variable names out of the cluster to an array of strings?

I expect there will be a nice solution to this but I have not found this.

 

The suggestion in "Get Array Names from Cluster" from the community appear to be to adsvanced?

 

0 Kudos
Message 1 of 6
(7,400 Views)

If you know the structure of the cluster you can just supply an array constant with the names yourself?

 

If you do not know the names for some reason you could use a VI in the 'Open G' library called: -

 

Get Cluster Element Names__ogtk.vi

 

If you do not have Open G then a search on here should help you find a link to it

David
www.controlsoftwaresolutions.com
0 Kudos
Message 2 of 6
(7,396 Views)
Solution
Accepted by topic author skalis

Building on the OpenG suggestion, here's a snippet:

GetClusterElemNames.png

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 3 of 6
(7,368 Views)

This sounds too easy, but is this what you want?

 

Example_VI.png

PaulG.

LabVIEW versions 5.0 - 2020

“All programmers are optimists”
― Frederick P. Brooks Jr.
Message 4 of 6
(7,358 Views)

What is that block in PaulG's for loop and where can I find it!?

 

Thanks!

Joey

0 Kudos
Message 5 of 6
(6,142 Views)

@powerfactor0 wrote:

What is that block in PaulG's for loop and where can I find it!?


That is a property node.  The simplest way to create one is to right-click on the control you want to set/get the property for and go to Create->Property and choose whichever property you want.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 6
(6,137 Views)