Dynamically Called SubVI Does Not Load When Built into Executable

Updated May 31, 2018

Reported In

Software

  • LabVIEW
  • LabVIEW Run-Time Engine

Issue Details

I have an application that dynamically calls a subVI. The subVI is stored in a specified directory, and at run-time I point to this VI that I want to load. This subVI is not a a part of my LabVIEW project. This works as expected when I am executing in the development environment. However, I see the following issues when I run my executable on the deployment computer: 
  • When I build my project into an executable, the subVI does not load completely
  • LabVIEW Run-Time Engine shows Error 1003: The VI is not executable. This error may occur because the VI is either broken or contains a subVI that LabVIEW cannot locate.

Solution

Try the following steps to resolve this issue:
  1. Build all of your dynamically called VI's dependencies into a Packed Project Library (PPL).
    1. Include all of the subVIs called by your dynamically called VI in your LabVIEW project
    2. Right click on My Computer >> New >> Library
      1. Add all of the subVIs that are your dynamically called VI uses to the library you just created
    3. Build these subVIs into a PPL by right clicking on Build Specifications >> New >> Packed Library
      1. Under the Source Files category, set your library as the Top-level Library
    4. Build an executable by right click on Build Specifications >> New >> Application (EXE)
      1. Under Source Files category, add your PPL to be Always Included
      2. Under Destinations category, set the Support Directory Destination Path to be a file path 
  2. If the dynamically called subVI uses any controls, set the access scope of the controls to Public. 

Additional Information

Your dynamically called VI not loading is a result of a linking issue between this VI and its dependencies. Since the dynamically called VI is not part of the executable, when it is called its dependencies (subVIs) try to point back to vi.lib in the development environment. The dynamically called VI does not know where to look in the execution namespace for its dependencies. 

WAS THIS ARTICLE HELPFUL?

Not Helpful