LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reference of a control from the reference of a vi

Use the property node Array Element.  You can cast that to a more specific type of control if needed.

 

Message Edited by Ravens Fan on 11-02-2009 07:50 PM
0 Kudos
Message 11 of 20
(1,456 Views)

Try this (Test.vi).

 

Jean-Marc

 

 

LV86

0 Kudos
Message 12 of 20
(1,443 Views)
This still does not tell me how to obtain references to the individual elements of an array.
0 Kudos
Message 13 of 20
(1,432 Views)

The only way that I have ever read about to get at elements in an array is demonstrated in the Nugget I linked above. Asie from that example, I know of no other way to get at indiviual elements inside an array.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 14 of 20
(1,429 Views)

In the "Get All Control ReferencesV4.vi" you have:

 

Array element.jpg

 

 

 

Jean-Marc

0 Kudos
Message 15 of 20
(1,427 Views)
The only thing that is of meaning for "individual elements of the array" is the value of a particular element.  In that case you can use the Value property node of the array and then index array to get the value of your element of interest.  All other properties of the elements of the array must be the same, in which case you use the method I showed you in reply #11 to get the properties of the elements.
0 Kudos
Message 16 of 20
(1,420 Views)
I need the reference to the individual elements because I'm using an array of clusters and need to access nonvalue properties of individual controls inside of the clusters.
0 Kudos
Message 17 of 20
(1,414 Views)

Steve Block wrote:
I need the reference to the individual elements because I'm using an array of clusters and need to access nonvalue properties of individual controls inside of the clusters.

 

provided you are not trying to set the properties of different elements of the array to different settings, the code shown in that Nugget will help show you how to do it.

 

Yes that Nugget is not easy to understand but what what you have been asking is not easy and prior to that Nugget was not commonly concidered possible.

 

No I don't get paid my how many views of the Nugget i get.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 18 of 20
(1,410 Views)

In the "Get All Control ReferencesV4.vi" you have:

 

But this only returns the reference to the array. I need access to individual elements.

 

 

"provided you are not trying to set the properties of different elements of the array to different settings"

 

I am trying to.

0 Kudos
Message 19 of 20
(1,407 Views)

"Stop right there!" ("Paradise by the Dashboard Lights", Meatloaf)

 

Elements of an array can differ ONLY in their value. The properties of all elements in an array MUST be the same.

 

if you really need to do that, use a cluster where you can have different properties.

 

Ben 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 20 of 20
(1,401 Views)