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.
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.
08-19-2019 10:13 AM
Can I click Array to get the data and index of that location?
I uploaded a picture!
Solved! Go to Solution.
08-19-2019 10:31 AM - edited 08-19-2019 10:43 AM
Yes, but not easily.
You have the coordinates of the button click at the left edge of the Event Structure there. Together with a collection of Property Nodes to get the position of the array, the width and height of the elements, and some knowledge of the spacing (depends, if I recall correctly, on the indicator type (Modern, System, etc)) you can calculate the element index.
From the index, you only need Index Array to get the data value (you can get the array value from the Ctrl Ref if that pink wire to the left is not the current data values).
Edit: Actually, if the array is selectable, then the Array Element > Value property node will give you the value of the element. In that case, the Index is more difficult to find, but do you need that (or only to get the value?)
IndexVals is read here because I suspect that might also be relevant to getting the index of the selected element (since the click is relative to the visible elements, not the 0,0 element (imagine you already scrolled down the array etc).
08-19-2019 10:34 AM
08-20-2019 09:17 AM
Thanks !
I solved this problem with your help
You r my Hero!!
감사합니다!!
08-20-2019 09:46 AM
Since you are using strings consider using a table instead of an array.
A table has a method "Point to Row Column" that will return the index as well as a Boolean if the click was in the bounds of the table.
Ben
08-26-2019 08:54 AM
Hi guys..
1.I want to get Row's values in a two-dimensional array when clicked.
What kind of ways are there?
2. Is there a way to get an Index of the click of a two-dimensional array?
plz help me
08-26-2019 09:10 AM
08-26-2019 09:17 AM
I didn't understand what you were saying.
What does Old Topic mean?
08-26-2019 09:29 AM
On August 19, you created a topic called "About Array Click Event". That is the "old" topic.
Because on August 26, today, you created a new topic called "I have a problem aboud (sic) Array get rows" although it was about the same question.
Someone merged the two threads into one.