04-04-2008 10:39 AM
04-04-2008 11:08 AM
Hey,
Did you reference your VI as supporting File (since 8.5 "always include") in the build specifications?
Attached you will find a little example project using the "Call by Reference Node" to dynamically call aVI.
Christian
04-04-2008 02:01 PM
This definately sounds like you have not placed your vi into your executable. When you dynamically call a vi, it is not included automatically into the exe. You have to add it as a support file. There is a window in the exe builder where at the top left you select your "top level vi" then below that your "support vis" Make sure that the vi you are trying to call is included in the support vi list.
If you are always calling the same vi, even multiple times, there is a way to get the path without as much bother. Create a static reference to your vi. It is a little icon into which you place your vi on the diagram. Pull the reference from this, then use the properties vi to get the path. Open your vi reference using this path. Do not use the static reference to do things to the vi, as this can cause problems for you, especially if close the calling vi.
Good luck,
04-11-2008 04:04 PM
04-11-2008 06:49 PM
04-14-2008 08:17 AM
Thanks guys... As we all know, there is quite alot that goes on under the hood of labview programs. Compound that with code organization and the changing things around by the developer, and it can get annoying trying to keep up with all the paths in a program. One of the projects I work on has a couple thousand vi's in it and many dynamic calls. If you reference a vi from more than one place, it gets even more interesting because you have to find all the places to make a change. This way, when you change the vi, or where it is at, labview at least makes an attempt to correct the problem without intervention of the developer. You may still have to go in and tweak, but it saves you from going through every dynamic call for every little change.
Glad I could help.
04-08-2009 05:51 PM
I have a similar but slightly different problem. I want to have a separate LV VI call a VI in an existing LV executable without having to modify the executable (it has been released). I found an example in the devzone that does just that. Controlling Two Executables with the VI Server http://zone.ni.com/devzone/cda/epd/p/id/1366
Very cool and it even works. The problem is that it was built in LV 7 and I'm using 8.6. When I try to do something similar in 8.6, I get the aforementioned Error 7 File not found when I try to point to the slave.vi within slave.exe.
Seems like the way LV deals with VIs inside exes has changed.
Is there a new way to accomplish my goal of calling a VI within an existing exe?
Thanks,
Hans
04-09-2009 12:24 PM
Hi hans17,
As of LabVIEW 8.2, this is no longer allowed. Please check out this KB for more information: Accessing VIs Inside of a LabVIEW Executable or DLL in LabVIEW 8.2 and Later