LabVIEW Idea Exchange

About LabVIEW Idea Exchange

Have a LabVIEW Idea?

  1. Browse by label or search in the LabVIEW Idea Exchange to see if your idea has previously been submitted. If your idea exists be sure to vote for the idea by giving it kudos to indicate your approval!
  2. If your idea has not been submitted click Post New Idea to submit a product idea to the LabVIEW Idea Exchange. Be sure to submit a separate post for each idea.
  3. Watch as the community gives your idea kudos and adds their input.
  4. As NI R&D considers the idea, they will change the idea status.
  5. Give kudos to other ideas that you would like to see in a future version of LabVIEW!
Top Kudoed Authors
Showing results for 
Search instead for 
Did you mean: 

Array active index via Property node

When working with Arrays via VI Server (similar to a previous idea) it's challenging to get at a single element of the array.


My workaround involves setting only one array cell visible and then changing the index to move to different elements....


Why can't we read / write the current active index of the array via Property node?



Proven Zealot

> Why can't we read / write the current active index of the array via Property node?


Because there is only one array element control. LV instantiates only a single copy of the array control and draws it multiple times with each index's value. It would be impossible to have independent properties for each index without instantiating N controls where N is the number of elements currently in the array, which would be a huge memory allocation (because even if only 4 are showing, as soon as you start scrolling through the array, you would want to have each individual control show its individual properties -- color, etc). Also, some properties have to be kept in sync (notably size, which implies others, such as font height).


If you want properties per array element, you have to manage all the overhead yourself. Create a cluster of N copies of the element, a scroll bar control (or an array index numeric control) and then update the N displayed elements as the user "scrolls" through the data. This is a very non-trivial operation, and the overhead incurred is specific to every implementation of the display. That's why LV cannot build a generic implementation without a huge amount of memory overhead. 

Trusted Enthusiast

I am not referring to cosmetic changes. I am not asking for all references of a single array element to be index-specific.  I don't want any change in that regard at all.


I am referring in essence to the "Value" and "Value Signalling" property of the "Element" object.


We can set the value of a SINGLE array element using this method but any cosmetic changes affect ALL array elements.


So in Effect, the Value property IS independent for each array element, and it is basically THIS property which can be indexed (using some tedious workarounds) to access single elements of an Array whose reference has been passed to a subroutine.



I only want to be able to choose which actual element the "Array element" property is pointing to so that the "Value" property which IS independent for each Array element becomes useful.


VI Server (Array Element).PNG



Message Edited by Intaris on 06-15-2009 07:38 AM
Trusted Enthusiast

No further comments on this?


Is it at elast acknowledged that what I want should NOT require the huge memory allocation Aristos was talking about?


Why even have the "Array Element" - "Value" property if there's essentially no way of knowing which array element it is?



Trusted Enthusiast

BTW, there IS the ability to set the Array index programatically but his doesn't work if there is more than one array element visible at a time.  Any given array element can be the "Active" one at any time and there's no way of finding this out.  The only workaround is to temporarily set only a single array element visible, do the operations and then set the visibility back to normal....



Active Participant

Can you post an example showing this?  I have also been scratching my head as a long time LabVIEW user trying to do something that I thought would be very simple: programmatically thru property nodes have the array index set = 0 when a user first enters one of my modules.