LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get array index by mouse click

Hi ,It is my first post,and please excuse me for my bad english.

My problem is: I want to Get the index array by mouse-click.With Array Property node IndexValue in read mode i can t to read the right index.I try to find a answer in this forum but i dont find a specific thread. Thanks a lot.

0 Kudos
Message 1 of 7
(12,437 Views)

 

 

If you do a search with "array index mouse" you will find this answer:

 

 

https://forums.ni.com/t5/Example-Code/How-To-Return-the-Index-of-a-Mouse-Select-Array-Element/ta-p/3...

0 Kudos
Message 2 of 7
(12,429 Views)
Message 3 of 7
(12,396 Views)

Ty at all guys!i have doneSmiley Wink

0 Kudos
Message 4 of 7
(12,366 Views)

If your need for the index is only to get the value of cell that was clicked on,

that can be done using Property Node ArrElem.

 

GetArrayValueFromMouseClick.png

 

 

Omar
Message 5 of 7
(12,356 Views)

Use the MGI Library: https://www.ni.com/en/support/downloads/tools-network/download.reusable-vi-library-for-labview.html

MGI Position to Array Index

mgi.PNG

 

 

This uses VI Scripting, but Master Bounds Rect Property available in Run-Time Engine: https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/properties-and-methods/vi-server/generic/g...

Message 6 of 7
(8,565 Views)

This vi Very Helpful 

Thank for Sharing..

 

 

 

 

0 Kudos
Message 7 of 7
(5,780 Views)