Example Code

Dynamically Search for Type Definition Files Using VI Script Property Node

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

In the event you have a large project directory and need to reorganize custom controls you have saved, you can automate the process by enabling VI Scripting in LabVIEW.  You can then dynamically call your .ctl files and organize them by type definition using the Is Typedef? Property in VI Scripting.

 

Description

This VI points to a directory and recursively searches through subfolder for the *.ctl file extension.  The Is Typedef Property is then used to either search for controls that are not type defined, type defined, strictly typed, or class private data depending on the user's specification.  This VI is meant to be used in the development environment only as VI Scripting cannot be used in a run-time environment.

 

Requirements 

  1. LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Specify a directory containing custom controls or subfolders with custom controls.
  2. Select what definition you are looking for.
  3. Run the program.

 

Additional Information or References

VI Snippet

111.png

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

Regards,
Isaac S.
Applications Engineer
National Instruments

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