Example Code

Programmatically Reading the VI Properties of a Folder of VIs Using LabVIEW

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 VI searches the files in a directory and outputs the VI names and revision numbers.

 
Description
VI properties contain detailed information from the file path and name to the revision number.

LabVIEW automatically increments the revision number of a VI each time it is modified and saved. This property and others are accessible by using a property node connected to a VI reference. This program searches through a set directory and programmatically accesses each VI's properties, recording the VI name and revision number in an array of clusters. To access different VI properties, change the instance of the property nodes.

 
Requirements

  • LabVIEW 2013 (or compatible)


Steps to Implement or Execute Code

  1. Entire the desired directory to search in the File Path control on the front panel.
  2. Run the VI to populate the array of cluster data.

 

Additional Information or References
VI Block Diagram

1.png 

 

 

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

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