Create Cursor From File VI

Owning Palette: Cursor VIs

Requires: Base Development System

Returns a reference to a cursor in a cursor file.

If a VI that you want to distribute as a stand-alone application or as a shared library uses a cursor from a cursor file, you must distribute the cursor file with the application or shared library.

(Real-Time Module) You cannot use this VI in VIs that run on RT targets.

 Add to the block diagram  Find on the palette
cursor file is the path to the file that contains the cursor for which you want a reference. If the file does not exist or if the file is not a valid cursor file, LabVIEW returns error code 7.

(Windows) The file must have a .ani or .cur extension.

(macOS) The file must be a resource file. You also must wire the ID of the cursor you want to use to the cursor resource ID input. If the cursor image is larger than 16 × 16 pixels, the VI crops the image to that size.

(Linux) The file must have a .png extension. You cannot use animated cursors. Cursors are monochrome, and the shape of the cursor is determined by the how you set the transparency around the .png file.
(macOS) cursor resource ID is the ID for a cursor in the resource file wired to cursor file. If the cursor is animated, cursor resource ID must be less than 128. If the cursor is not animated, cursor resource ID must be equal to or greater than 128.
hotspot contains the coordinates of the cursor hot spot starting from the upper left corner. You cannot set the hot spot for animated cursors. National Instruments recommends that you set the hot spot only on Linux. Windows and macOS cursors already have hot spots, but you must set the hot spot for cursors on Linux.
x is the horizontal coordinate of the hot spot, which increases to the right. The default is –1, which means the VI sets the horizontal coordinate of the hot spot to the horizontal coordinate of the default hot spot for the cursor.
y is the vertical coordinate of the hot spot, which increases to the bottom. The default is –1, which means the VI sets the vertical coordinate of the hot spot to the vertical coordinate of the default hot spot for the cursor.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
cursor ID is a reference to the cursor in the cursor file. If a reference to the cursor already exists, the VI returns the existing reference. Wire this reference to the Set Cursor or Set Busy VIs to change the appearance of the cursor on the front panel of the VI.

Use the Destroy Cursor VI to close the cursor reference after you set the cursor.
error out contains error information. This output provides standard error out functionality.