Example Code

Create an Array of Cursors IDs in LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

Often an application calls for multiple cursors based on different conditions. This VI shows how to build an array of cursor IDs from cursor files in Windows and change the cursor based on user events.

 

Description

An array of paths is used to generate an array of cursor IDs, which are then indexed based on the user's choice of the "Cursor" control. The cursor ID indexed is then used to set the cursor in the current VI. When the user stops the VI, all cursor IDs are destroyed, or disposed of.

 

Requirements

  • LabVIEW 2012 (or compatible).

 

Steps to Implement or Execute Code

  1. Run the VI
  2. Select a cursor from the enum control and observe the changes.
  3. In edit-mode, change the paths and/or enum control to use custom cursors.

 

Additional Information or References

 

 

201708142.png

 

Snippet 2014.png

 

 

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

Rick C.

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