10-10-2014 07:20 AM
Hi all !
I am in process of building a application where main VI is linked with other VI using its file path and run them using invoke node. When I build an installer i suspect only the main vi will be converted into application. I am thinking the main vi should be able to run VI, application build by labview and any exe application.
I am looking for your suggestion for best course of action.
Thanks!
10-10-2014 07:24 AM
Add the other vi under "always include"
/Y
10-13-2014 09:23 AM
When building a VI LabVIEW will include all of the dependencies that are needed to run that VI. The only catch is if LabVIEW can't detect a file is a dependency, because the VI is loaded from a path and called dynamcially. You can perform the always include but in many cases you can just use a static VI reference and LabVIEW will see it as a dependency and load it. Also using a static VI reference you can use a property node and read the VI Path property. This way you can still load the VI from a path on disk dynamically, but the path on disk can change without your code breaking.
Most older code would have a path relative to the Main.VI. So maybe you have a VI in the same directory as the Main called Child.VI and you just strip the path of Main and build Child. The problem is when an EXE is made, the location of the file is not known. Is it in the directory the EXE is in? or is it in the EXE? and an EXE can have folders in it so where is it relative to the EXE? Using a static VI reference none of this matters. You just reference the VI, then get the path and use it.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord