Example Code

Tree Control To File Directory 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 example demonstrates how to generate a file directory with the tree structure.

 

Description

The recursive VI creates a folder for the each item at the current level in the tree, searches each item for children, and calls itself if any children are found. It returns when there are no more items at that level.

 

Requirements

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Choose a base path for the directory.
  2. Configure child folders in a tree control below. You can control the child folder depth by using drag and drop at the folder name.
  3. The folder configuration option can be found by right-clicking the tree structure control.
  4. Run the VI.

 

Additional Information or References

VI Snippet

Tree Structure.png

 

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

 

Ian S
Applications Engineer CLA
National Instruments UK&Ireland

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