Example Code

Front Panel Style Conversion Utility

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

 

Overview
This application is also a good reference for using VI scripting in other projects. It demonstrates creating/replacing/deleting controls, applying control properties, rewiring of block diagram, reorganization of block diagram, and relinking of property nodes.


Description
The application provided uses a configuration file to map control styles to other styles. For each style name, there should be a matching control type. The configuration is stored in the JSON file format, and must be located at the project level of the Front Panel Style Conversion Utility. To view, modify and save the JSON configuration, use the Configuration Cluster to JSON.vi, shown below:


Requirements

  • LabVIEW 2013 (or compatible)


Steps to Implement or Execute Code

  1. Configure the Input and Output file path.
  2. Run VI

 

Additional Information or References
VI Block Diagram

 Block Diagram.png

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

 

Julianne K
Systems Engineer, Embedded Systems
Certified LabVIEW Architect, Certified LabVIEW Embedded Systems Developer
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
OliverE
Member
Member
on

Very nice, exactly what I need to convert a large number of classic controls into a newer style.

I changed the configuration from JSON to XML and was able to export the project to LV2012.

One minor bug: Replaced clusters get disconnected from the connector pane.

Thanks a lot for the code!

Neuroscience
Member
Member
on

Nice utility. Exactly what I needed.

Barukh_t
Member
Member
on

Great utility!

This probably saved me a few months of work.