Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Referencing Source Files in Stand-Alone Applications and Shared Libraries

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

The Application Builder stores source files inside an application or shared library based on the directory structure of the source files on disk. This internal file layout preserves source file hierarchy inside the application.

If you call VIs dynamically, use relative paths to ensure the application loads the VIs correctly at run time. If the application references a data file outside of the application, you can use the Application Directory VI to determine the path to the file.

If you want to call VIs from the labview\vi.lib directory dynamically, create a wrapper VI for the file you want to load by adding the VI to the block diagram of a new VI. Prepare the wrapper VI as a subVI, and ensure the connector pane for the wrapper VI matches the connector pane of the original vi.lib VI.

Using the LabVIEW 8.x File Layout

If you enable the Use LabVIEW 8.x file layout option on the Advanced page of the Application Properties or Shared Library Properties dialog boxes, the Application Builder stores source files inside the application as a flat list. Because of this file structure, LabVIEW moves any files with conflicting filenames to different folders. National Instruments recommends you only enable this option if the application you build relies on the legacy behavior to store files in a flat list inside the application.

You can use the Built App File Layout VI located in the labview\vi.lib\appbuilder directory to determine if your application is using the legacy file layout for storing VIs inside a stand-alone application or shared library.

Path to source files Path to files in application Path to files in application with 8.x layout
C:\Source\foo.vi C:\..\Application.exe\foo.vi C:\..\Application.exe\foo.vi
C:\Source\xxx\a.vi C:\..\Application.exe\xxx\a.vi C:\..\Application.exe\a.vi
C:\Source\yyy\b.vi C:\..\Application.exe\yyy\b.vi C:\..\Application.exe\b.vi

 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit