Example Code

Truncate File Paths FGV

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 helps address the problem that was fixed by the Truncate Long Paths LabVIEW Idea Exchange for versions before LabVIEW 2012.


Description
This example helps address the problem that was fixed by the Truncate Long Paths LabVIEW Idea Exchange for versions before LabVIEW 2012.Note the three states:

Store Files Paths,Output Stripped Paths and Output Full Paths

 

Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

 

  1. Run the VI.
  2. Select Store Files Paths to save an array of paths in this FGV.
  3. Select Output Stripped Paths to remove the excess directories (user specified, defaults to the file + 1 directory) which may not permit the file in question to be displayed, and output the result.
  4. Select Output Full Paths to output the original full file paths.

 

 

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.