Example Code

Programmatically Open a VI 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 code programmatically open a VI from within another VI and see it running.

 

Description

This VI follows that methodology by creating a reference to a target VI. That reference is used to open the Front Panel of, and execute the target VI. When the target VI finishes executing, the reference to it is closed, and any errors are handled by the simple error handler VI.

 

Requirements

Software:

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

1. Run the VI.
2. Provide any VI location in PC.
3. Press Open File button.

 

Additional Information or References

 

snip2012.pngsnipped2012_2.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.