Description
Description-Separate-1Say you created an executable for your main VI, and the main VI opens and closes a subVI's front panel through an invoke node. However, when you build the executable, this subVI does not open or throws an error that it doesn´t find it. What should you do?
Description-Separate-2How to Use
How-Separate-1The steps to call a subVI dynamically within an executable is:
- 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.)
- In your calling VI: wire the name of your VI as a file path constant to the Open VI Reference, i.e. errorlog.vi.
- In your builder: go to Source Files and include your subVI as "Always Included."
Attached is an example for LabVIEW 2018.
How-Separate-2Related Links
Related-Separate-1Related-Separate-2