LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a vi from exe

Solved!
Go to solution

@Mctester wrote:

Very interesting explanation. Thank you!

 

I am trying to call a VI dinamically ( building the main path and VI name in runtime ) 

but this vi does not exist yet. For that reason I can not called as static reference. I can neither include the VI in the project due to deploy in specific path. This VI will be created in the future by the end user in an specific folder with my application.exe already compiled.

 

Is it posible to create an application for this purpose? How can I do it?


Sure.

 

You need to distribute the VI so the exe can find it (by it's path).

 

However, everything in the VI needs to be available to the exe, and it all needs to be compiled. So, the VI and all it's subVIs need to have separate compiled code off. SubVIs that are used in the exe (unless they're inlined) can be used though.

 

This get's messy fast. There are plenty vilib VI's that aren't available in the runtime. So the plugin VI might not seem to use any subVIs, it won't work unless you provide these resources (like picture control VIs).

 

The standard today is to put the VI in a packed library (ppl). This ensures everything is packed.

 

The bitness of the ppl needs to match (the exe can't recompile code). The LV version needs to be compatible, so the ppl needs to be make in LV14 or higher, but the same or older as the exe's version.

 

If the VI doesn't use any subVIs (or subVIs that are in the exe) I suppose you the exe will run it (iff the VI contains compiled code w/ correct bitness and LV version).

Message 11 of 11
(371 Views)