Example Code

Determine Index of Clicked Array Cell in LabVIEW

Code and Documents

Attachment

Overview:

This VI exemplifies how to return the index of an array cell that has been selected with the mouse.
Description:

This operation is done by calculating by calculating position bounds of the click and then determining in pixels where in that array the click occurred. The attached files contain the VI that performs this (as written by Jean Pierre on the forums: http://forums.ni.com/ni/board/message?board.id=170&message.id=45066&requireLogin=False) and a VI that demonstrates its use.
This could be useful to determinate the position of an array cell and help the user to navigate through the array data on the user interface.
Requirements:
LabVIEW Base Development System.
Steps to Implement or Execute Code:
1. Open the Demonstrate Position of Clicked Array Element VI
2. Run the VI
3. Click on an element of the array
Additional Information or References:



Snippet Demostrate.png**This document has been updated to meet the current required format for the NI Code Exchange.**

 

 

Doug Farrell
Solutions Marketing - Automotive
National Instruments

National Instruments Automotive Solutions

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.