LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

INDEX OF ARRAY INSIDE ARRAY OF CLUSTER UPDATES EVEN IF ANY INDEX IS UPDATED?

Hello,

I am trying to create a recipe in LabVIEW

 

I have created an array (RECIPE) with cluster elements, and inside this cluster elements I have an another array (FILE PATH)

My concern is that when I click on FILE PATH array, all the other FILE PATH array's index values are also updated.

I don't want this to happen. I want the only the index and the values of the FILE PATH array to increment on whom I am clicking my mouse button

 

Kindly guide, how I can resolve this issue

array.png

 

0 Kudos
Message 1 of 4
(717 Views)

I don't know why labview does that, but to behave as you want, you need to use a large cluster with all the file paths inside. 

LVNinja_0-1690212358644.png

 

0 Kudos
Message 2 of 4
(697 Views)

That solution wont help me, since I am not sure of the Array length of the RECIPE. The client will be configuring the RECIPE, therefore fixing the number of arrays in the cluster wont be idle for my application

0 Kudos
Message 3 of 4
(690 Views)

All array elements in LabVIEW must have identical property values, including IndexVals which is what determines which element is displayed in an array indicator. If you want a different behavior, you will have to implement it yourself.

 

What exactly is the effect you're trying to accomplish? Do you want the user to be able to select a single item from a list of items in each of your recipe entries? Or does it need to be a different array in each entry?

 

If it's a single selection, you might be able to use a combo box. Use an event structure to detect the Mouse Down event, then change the Strings property of the combo box in that. Then each click will show the user a different set of items.

 

If you need an array of values in each cell and you want their display indexes to be different, then you'll probably need to do some fancy manual processing with a dummy indicator, which is unfortunately going to be a bit of a pain. Not terrible, but not anything super quick either. One thing that might help is to add some "helper" elements to the main cluster array, which you can hide (right click menu). For example, if you want to show 3 elements at a time you could have a hidden "real" list of items that grows and shrinks as needed, but have a separate "Display" array with 3 items shown. When you need to change the displayed elements, just pick an offset and write a subset of elements from the "Real" array to the "Display" array.

0 Kudos
Message 4 of 4
(677 Views)