XNodes

From LabVIEW Wiki
(Redirected from Xnodes)
Jump to: navigation, search

XNodes are a technology built into LabVIEW, starting in LabVIEW 8. They allow dynamic edit-time macro support. XNodes are Libraries that feature several Ability VIs. These Ability VIs contain code the is executed by events that fire from the IDE (i.e. when clicked on, a wire is connected to one of its terminals, a right-click menu item is selected, etc.) An XNode ultimately scripts a wrapper VI that contains the code that will execute in the program using the XNode.

See also: List of XNode Abilities

XNodes used in LabVIEW 8.2


Class Aggregate Handler? (vi.lib\Utility\AggHandler\Cls_AggHandler.xnode)
Class Grow Array Handler? (vi.lib\Utility\XGrowArr-llb\Cls_GrowArr.xnode)
Regular Expression (vi.lib\regexp\Match Regular Expression.xnode)
Shared Variables (vi.lib\variable\varXNode.llb\vi.lib\variable\varXNode.llb\varXNode.xnode)
Timed Loops (vi.lib\Platform\TimedLoop\XDataNode\XDataNode.xnode)
Database Variant To Data (vi.lib\addons\database\_DB Variant To Data\Database Variant To Data.xnode)

Ability VIs

Main Article: List of XNode Abilities.

XNodes in Palettes

XNodes can be added to palettes as if they were plain VIs; however, the icon that is displayed in the palette is that stored in the .xnode file and not the image created by the Image Ability vi. It is possible to set the icon in the .xnode file by manually editing the xml file. One way of doing this is to create a LabVIEW library (.lvlib, not .llb) from within LabVIEW and edit the icon for this library. Then making sure that all references to the Xnode are closed, open both the .lvlib file and .xnode file in a text editor and copy across the <Property Name="NI.Lib.Icon"... line.

Developing XNodes

LabVIEW contains functionality to create and edit XNodes as libraries, similar to XControls; however, this functionality is not an official part of LabVIEW and is disabled by default. On Linux and macOS, you can enable this functionality in the LabVIEW configuration file, by setting XNodeDevelopment_LabVIEWInternalTag to True.

On Windows, it is not quite as simple, as the functionality is instead enabled via the license manager, requiring an activated license containing the feature LabVIEW_XNodeDevelopment. However, NI does not sell (nor give away) this license, and their server will not activate it for anyone outside of NI. As such, unless you work for NI, enabling XNode development on Windows requires one to bypass the license manager somehow, which may be illegal in some jurisdictions even if you aren't using it for piracy. One alternative is to use another tool to create and edit XNodes, such as hooovahh's XNode Editor.

If you have enabled XNode development natively, "XNode" will be available as an option in the File->New dialog. It will appear in the same way as any type of library, and you can add Ability VI's just like one would on an XControl.

See Also

External Links