This tool is provided as an example to the LabVIEW user community under the Sample Code License (ni.com/samplecodelicense). It is not a National Instruments product and not supported through the regular support channels. Please leave questions and feedback about the UI Manager in the comment section below and rate the document. Please provide suggestions for new features and improvements and related use cases.
This tool is designed to help programmers capture and apply complex UI configurations to any LV VI, both at edit and run time. Using the User Interface Manager Tool and its API, you will be able to configure your UI, capture that configuration, export and import it from XML file, and apply any previously captured configuration. Using this tool you can separate the configuration of your UIs from your application functionality and still be able to achieve any effect as you would using standard VI Server methods and properties.
If the user interface property you want to capture is not handled by the standard provided UIPs, you can create a new one, using the UIP Class Template. By providing your own implementation for five simple methods, you will be able to capture any property from the controls on your VI front panel.
This tool has not been tested on LINUX RT with UI.
Some of the use cases that can be handled by this tool include:
Localization of the UI
Changing visibility of controls
Changing the enabled state of controls
Changing the color scheme of the UI
Resizing UI to fit resolution
Currently available User Interface Properties (UIPs):
Example additional UIPs (in ZIP archive):
Waveform Chart Color
Owning Pane Color
The package provided below, installs the UI Manager API to be used programmatically in your applications and the UI Manager Tool in the LabVIEW Tools menu, which allows you to capture UI states interactively in a user friendly way.
Version 220.127.116.11 - Changed the behavior when user wires CTL reference into Apply or Capture method. Right now the behavior is that the wired references are used and the VI is not traversed for references. This improves performance in big applications, by specifying up front, which CTL refs to use.
Version 18.104.22.168 - Updated the examples with more descriptive names. Modified one example to show how an app with UIM API can be built into an executable.
Version 22.214.171.124 - Removed the requirement for other packages to be installed with this tool. Now it is an independent package. Removed some small errors related to running the tool from the menu.
Version 126.96.36.199 - Due to unforseen bug while loading had to revert back to LV 2016. The package is again only available in LV 2016 and higher.
Version 188.8.131.52 - Includes a QuickDrop shortcut for capturing the UI state into an XML file. Now, to capture state of the UI you just need to press Ctrl+Space Ctrl+U. The file generated this way will have the same name as the VI and the extension XML. It can be then loaded using the API or the UI Manager Tool from the tools menu.
An additional option you can use is the <Ctrl><Shift>+<U> which will take the text from the QuickDrop ComboBox and use this text as the UI state name.
Figure 1: Main window of the UI Manager Tool
Figure 2: UI Properties specification pane in the UI Manager Tool
Figure 3: Function palette for the UI Manager showing the API functions
Figure 4: Example of programmatically setting the UI configuration using the UI Manager API