Calling a SubVI Dynamically Within the Same Executable

Updated Aug 30, 2018

Reported In

Software

  • LabVIEW

Issue Details

I want to create an executable for my main VI. The main VI opens and closes a subVI's front panel through an invoke node. However when I build the executable, this subVI does not open or throws an error that it doesn´t find it.

What can I do?

Solution

The steps to call a subVI dynamically within an executable is: 
1. In your SubVI: click File>>VI Properties>>Windows Appearance>>Customize and check "Show front panel when called".  (alternatively you could program this behavior based on where it´s being called from, refer to Control When the Front Panel of a SubVI Opens in LabVIEW and "How to Determine if an Application is Running as a VI or as an Executable" KBs to do so)
2. In your calling VI: wire the name of your VI as a file path constant to the Open VI Reference. i.e. errorlog.vi 
3. In your builder: go to Source Files and include your subVI as "Always Included". 

Additional Information

Attached is an example for LabVIEW 2018.

WAS THIS ARTICLE HELPFUL?

Not Helpful