Example Code

Open a Project via an Executable using LabVIEW and ActiveX

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

Coding that exemplifies how to load a project and open it programmatically.

 

Description

If you're looking to create an executable that opens a project on the computer it's running on, you won't
be able to access the LabVIEW application from the executable because it's running on the LabVIEW Run-Time Engine. To
overcome this, you'll need to use ActiveX to call into LabVIEW.exe to access the project files on the computer that the
executable is running on.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Reproduce
1. Select the project path and insert it in the "Project Path" string.
2. Run the VI.

 

Additional Information or References

Snippet.png

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