From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Array Element reference

Hi all,
There some problem with array property - Array Element. This property always get reference to active element of array, so you want to get in loop references of all array elements you can't do it by simple way.
I know some trick how to do it: by changing Array Property IndexValues you change Active Element. But the problem that this method change GUI.
My question is there another method to do it?
0 Kudos
Message 1 of 6
(3,938 Views)
If I understand what you mean, you need to get the references of all the element of an array, correct ?

Why Smiley Surprised ?
As far as I know, if you change a property of an element in an array, the same change will be applied to all the elements of the array, appart of course for the value Smiley Wink.


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 6
(3,931 Views)
Hi TiTou,
 
i need to operate with array of clusters and i don't know actually type of cluster, but i have some VI that get me all data about cluster, what values in each cluster element, what type,.... So i need to get reference of each array element for this VI
0 Kudos
Message 3 of 6
(3,923 Views)
Well... I think you have to go with the tip you described... getting the size, a for loop to set each element one by one... the problem is that this will be quite slow... Smiley Indifferent

Sorry no idea on how to improve that... Smiley Sad


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 4 of 6
(3,919 Views)
Hi,
 
Take a look at the attached image (too big to imbed in the post) to get an idea on how to manipulate an array of cluster using references.
 
Titou is absolutely right about this method being sloooowwww Smiley Very Happy
 
Hope this helps...
 
cheers
 
David
Message 5 of 6
(3,915 Views)
In fact, I was wondering if there was another method using OpenG Variant Lib... Smiley Surprised

But I´m not used to play with variant and I was expecting somebody more experienced to come up with a better idea.


That reminds me of the "escalate" button Ben was talking about in the breakpoint board 😉

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 6 of 6
(3,907 Views)