LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get data from a 2D array following the elements selected in a menu ring

Solved!
Go to solution

Thank you for your response

but I didn't understand how to use the point to row column method and how to wire it with the inputs that i have, in order to get the indexs of the listbox items in the array.

In the examples given, they have multiple MultiColumn Listboxes and they used an event case, which i think isn't necessary for my case! 

Please, would you help me to use this method, because i have developed several other codes but they didn't work to have the expected indexs array, i have in almost of the cases (-1) which means that the listbox selected elements aren't found in the array

ThankYou 

0 Kudos
Message 11 of 30
(535 Views)

Hi.

see if this helps..

bharath_p
LV2020
0 Kudos
Message 12 of 30
(529 Views)

Hi,

Thank you so much for your response, that helped me to understand how to use point to row column method, but doesn't respond exactly to what i want to do.

In fact, i have one column orders list and i want to know the rows indexs and the columns indexs of the selected orders in the big initial array as the VI that I attached previously,  knowing that we access to this array it through a path file;

In your example it gives me the row-column indexs of a selected item in the listbox, however i want to know the row-column indexs of selected items of the listbox in another array according to the selected elements, to extract after that the data related to these items from these indexs.

0 Kudos
Message 13 of 30
(522 Views)

hi samehA,

I can't open your VI, I am using LV2011..can you convert and post it again?

"however i want to know the row-column indexs of selected items of the listbox in another array according to the selected elements, to extract after that the data related to these items from these indexs."

I didn't fully understand this. 

bharath_p
LV2020
0 Kudos
Message 14 of 30
(518 Views)

HI, 

you will find attached the VI that i made converted to 8.0 version. In fact, i have two inputs, a listbox where there are many orders and a 2D string array.

My objective is to obtain the rows and columns of the selected items of the listbox in the 2D array, that means that i should have an an output, an array with 2 columns, one for the rows index and the second for the column index of the items selected in the listbox.

and then i should extract data from theses indexs ( obtain a 2D array where there are all the information related to the orders selected in the list box)

for the example attached here, if i select  order 1 and order 24 in the listbox i must have a 2D array (line-column): { (5,0) ; (5,4) }, then have the values correspondant to these orders from this indexs array.

0 Kudos
Message 15 of 30
(510 Views)

My original VI searches the 2d Array for the data in the listbox (just for loop to find multiple) and will find the index (row and column) of that selection. 

 

You are being confusing when talking about getting another 2D array... what do you need? do you need all the data thats in the column of the selection or the data thats on the row of the selection?

 

i.e.:

 

x, y, z

a, b, c

 

search for b >> it is in column 1, row 1. >> extract all data from column 1 >> output is y,b

 

OR

 

Search for b >> it is in column 1, row 1 >> extract all data from row 1 >> output it a,b,c

 

Please be clearer..

 

Regards

0 Kudos
Message 16 of 30
(508 Views)

HI!

For the example that you gave:

x, y, z

a, b, c

 

 I search for b >> it is in column 1, row 1. >> extract all data from column 1 >> output is y,b, ... ( the columns) 

0 Kudos
Message 17 of 30
(502 Views)

OK

 

So you'e been given the VI to get the row/column already..

 

just index or get array subset of the original array using the column...

0 Kudos
Message 18 of 30
(499 Views)

The VI given is available only when you search for one element in an array , however i have a list box, it means that i can have many elements selected at once and i need to have all the columns indexs of these elements in the 2D array

0 Kudos
Message 19 of 30
(495 Views)

The snippet we gave you here does exactly what you want...

CLAMaxime -- Kudos are a great way to say thank you
0 Kudos
Message 20 of 30
(490 Views)