From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW APIs Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW UI Template Tool

scrubdialog.PNG

This is the main VI of a front panel template tool. This tool is built from the Get VI Reference Dialog reference architecture, and therefore can be integrated easily into the LabVIEW Tools drop down menu. When run, it allows the user to select a VI in memory or browse to a VI on disk and change all of that VI's front panel indicator and controls.

select.PNG

The controls and indicators can be replaced with internal LabVIEW styles Modern or System, or they can be replaced with custom controls found in a user provided directory.

When pointing this tool to the user provided directory, the UI template tool will find ctl files in that directory and determine their style (numeric, graph, dial, etc...). After determining the style of all the ctl files in the user provided directory, the tool replaces the selected VI's controls and indicators with the appropriate user provided ctl files (Dials with a dial ctl, Graphs with a graph ctl, etc)

If a bgcolor.txt file is found in the user provided directory, this tool will read that file to decide what color to make the front panel. The tool reads the first line of the text file and converts it to a U32 to set the color of the front panel. All colors in LabVIEW are U32s. So if there is a text file named "bgcolor.txt" inside the dir you targeted, and the first line of the text file is "14287087"... then the targeted VI will have its front panel turn pink. This is accomplished with LabVIEW Scripting.

Some examples:

VI with all modern controls converted to internal system style:

before1.png AFTER.png

A VI converted to a directory of external controls, in this case, the NI.com theme:

before2.png AFTER2.png

Stephen B
Comments
StephenB
Active Participant
Active Participant
on

The 'scrub' to modern 'replace map' is not finished in this example. It only replaces numerics right now.

Stephen B
Contributors