Creating XControl Properties
- Updated2026-01-28
- 3 minute(s) read
XControl properties allow the user of an XControl to configure the XControl programmatically. The user of an XControl uses a Property Node to get and set XControl properties. LabVIEW calls the Facade VI after the user gets or sets a custom XControl property. If using the property changes the display state, the Facade VI updates the display state so that the XControl can update its appearance. A Display State Change event is generated on the Facade VI in this case.
In the XControl library, each XControl property is represented by one or more VIs, depending on if the property is read-only, write-only, or read/write. Each VI represents the read or write functionality of the property.
Complete the following steps to add a property to an XControl library.
- Right-click the XControl library and select from the shortcut menu to display the Create
Property dialog box. Use this dialog box to add a property to the XControl
library. LabVIEW creates a folder with the same name as the property in the XControl
library. If you create a read/write property, the property folder contains a VI for
reading from the property and a VI for writing to the property. If you create a read-only
or write-only property, the property folder contains only one VI for reading from or
writing to the property, respectively.Note The property folder cannot contain more than two VIs.
- To edit the property, double-click each VI in the property folder to open the VI that represents read or write functionality of the property.
Editing the Read VI
The read VI represents the read functionality of an XControl property. The read VI includes display state and container state controls and display state, value, and error indicators. Do not delete or change any of these controls or indicators because LabVIEW uses them to pass in display state and container state to the property and retrieve any error information. By default, the read VI also includes an LED indicator for the value. Replace the LED indicator with an indicator of the appropriate data type to configure the type of data that the property reads.
To delete the VI, right-click the VI and select Remove from Project. Right-click the property folder and select to add a read VI to a write-only property.
Editing the Write VI
To delete the VI, right-click the VI and select Remove from Project. Right-click the property folder and select New»Write VI to add a write VI to a read-only property.