LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to build executable file for a project with plugIn subVI?

Solved!
Go to solution

 

Hi,

 

I want to build an executable file for my project which has plug in sub VIs. I have below error when I run the .exe file.

"

Error Code: 7, Error Message: Open VI Reference in mainGUI.vi<APPEND>
VI Path: <b> ************* </b>

Built Application or Shared Library (DLL): Make sure all dynamically loaded VIs were properly included in the build specification for the application or shared library.

LabVIEW Real-Time: VIs built into executables cannot be accessed through VI Server calls. Use Source Distributions to dynamically call VIs on Real-Time targets.

"

 

In my mainGUI.vi, I use below method to plugin a sub VI. And I had include the folder PlugInVI while building .exe file. What should I do to solve this error?

 

Thank you!

 

1.jpg

0 Kudos
Message 1 of 16
(2,130 Views)

Are you sure that VI is in that location?  That is what the error is indicating.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 16
(2,092 Views)
Solution
Accepted by topic author Dylan.Zhong

If your exe is in ..\builds subfolder, move it to the project folder; or move the PlugInVI folder to ..\builds\PlugInVI.

 

Untitled.png

 

George Zou
0 Kudos
Message 3 of 16
(2,081 Views)

What code/nodes (primitives/non-primitives/driver APIs/DLLs) does your "sub_8743.vi" contain?? Could you post that VI here?!

- Partha ( CLD until Oct 2021 🙂 )
0 Kudos
Message 4 of 16
(2,080 Views)

Hi

It seems like the absolute path to your SubVI is different than expected during run time. You can fix this by going to the properties of your build and fix locations for PlugIn VIs. Also try building llb files(select remove block diagrams option) instead of copying your SubVIs into builds folders so that your source code will be protected as well.

Master of Science Mechanical Engineer
Ozgur Aslan
Senior Software Developer
Aerospace and Defense
Michigan, USA
0 Kudos
Message 5 of 16
(2,079 Views)

Dear Zou,

 

I tried your suggestion, it succeeded. But it also means I need to put my sub vi source together with my exe file. Is there any way that I can only pass this exe file to my end user without giving them the sub vi included?

 

My structure is I have one mainGUI which is my user interface. sub_xx.vi is the subVI used in main. PlugInVI is the sub vi done by other developer which is inserted into sub panel of mainGUI. Driver folders are vi called by vi in PlugInVI.

 

2.jpg

0 Kudos
Message 6 of 16
(2,037 Views)

Dear Freelion8,

 

I tried to build the llb file which includes all my sub VIs. But during the exe file generation, I cannot find a way to include this llb file. What would be the steps to include llb files into exe file generation instead of using original sub VI files for IP purpose?

0 Kudos
Message 7 of 16
(2,030 Views)

@Dylan.Zhong wrote:

Is there any way that I can only pass this exe file to my end user without giving them the sub vi included? 

 


No! If you don't (want to) include the SubVI (developed by other developer or whoever) along with the EXE, how would LV know which VI to call dynamically?!

- Partha ( CLD until Oct 2021 🙂 )
0 Kudos
Message 8 of 16
(2,027 Views)

Hi

Go to properties of your build, then select Destinations, here, you can add new destination folder for your llb files by clicking "+" sign, give a new destination label for each destination you added, select llb option for each destination. Next, go to source file settings, click on your project file under "Project Files" section, and select a destination for the selected file from "Destination" drop down list. By the way, in order to see your project files under "Project Files" section, you may need to add your SubVIs, Controls and Main VIs to your project as an auto-populating folder or as a .lvlib if you are using libraries. If you do this right, your .llb files will be successfully created along with your .exe file. Also remember, you need to fix your source code in order to find the right path for each dynamically called SubVIs, you can always create a case structure for which environment you are using ,Development System or Run Time System, and create a right path for each dynamically called SubVI, especially for Run Time System, you need to call them from your .llb destination.

Master of Science Mechanical Engineer
Ozgur Aslan
Senior Software Developer
Aerospace and Defense
Michigan, USA
0 Kudos
Message 9 of 16
(2,009 Views)

@Freelion8 wrote:

If you do this right, your .llb files will be successfully created along with your .exe file.


On the contrary, the OP's question was "Is there any way that I can only pass this exe file to my end user without giving them the sub vi included?".

 

Is there any way, really?! Smiley Indifferent

- Partha ( CLD until Oct 2021 🙂 )
0 Kudos
Message 10 of 16
(2,004 Views)