03-28-2018 09:42 AM
Hello,
I have a 2D array of values and I want to extract data from this array following the selection in the menu ring (this menu ring contains classes like this (class1, class3, class18, .... , class 100)).
For example, if I select classes 1, 3, and 100 from the menu ring, I want to have the corresponding 2D array data for those classes, that's why I have to look for the row and column indexs of (class1, class3, and class 100 ) in the 2D array, then, in a next step, extract data from the indexs that i have found.
PS: - I have to obtain the indexs of the rows and columns of the classes before because I will need them after for another data processing.
- Each class is located in a different column in the 2D array.
I hope that i have express clearly my objective.
Do not hesitate to ask me questions and thank you in advance for your help.
Solved! Go to Solution.
03-28-2018 10:04 AM
I am not sure I totally understand your problem and your VI (or at least some data) would hepl.
However, you'll find attached a VI of what I get from your problem.
Hope it helps, do not hesitate to add more details if not 🙂
03-28-2018 10:05 AM
Sameh
You can't select multiple items in a ring. Use a list box.
For searching You'll want something similar to the attached VI snippet (2017) but replacing the DBL with string likely. You can the index appropriately with the indices output...
This should get you started.
Cheers
J
03-28-2018 10:30 AM
Thank you for your response
In fact, i was wrong about the nomination, (my labview is in french), it's not a menu ring but a list box where i can select multiple items at once and i need to have the indexs of the columns of all the items which i selected
03-28-2018 10:51 AM - edited 03-28-2018 10:51 AM
Something like this ?
03-28-2018 11:04 AM
I didn't understand How did you find a 2D array as a result? I do the same as your code, but i found a 1D array
However, i must obtain a 2D array with 2 columns, one for the rows index and the second for the column index of the items selected in the list box.
and then i should extract data from theses indexs ( obtain a 2D array where there are all the information related to the classes selected in the list box)
03-28-2018 11:15 AM
Thank you for your proposed solution, it gives me the final 2D data array of the selected items in the list box, and that's good, but i need first to have the 2-column-array of the lines and columns indexs of theses items, and from it , i extract the datas in a second step.
My problem is that I didn't know how to obtain this indexs array when i have mutiple items selected in the list box?
03-28-2018 11:27 AM
Can you provide us with an example VI please ? That would make it much more easier to understand what your inputs are 🙂
Thanks
03-29-2018 02:24 AM
Hello,
You find attached what i have done, As an input, i put a constant array analog to the file i'm working on.
I succeed to have the rows indexs by searching "NORMES" in the array , but for the columns indexs, i have as imputs a list box of the orders and the initial array, so when i have more than one order selected, i have to get the indexs of the columns where there are these orders.
for the example attached here, if i select order 1 and order 24 in the list box i must have a 2D array (line-column): { (5,0) ; (5,4) }, then have the values correspondant to these orders from this indexs array.
Thank you for your help.
03-29-2018 03:50 AM
hi samehA,
you need to use property called point to row-column, which gives you the row-column nos,
more info.