08-29-2011 12:08 PM
In the File IO Palette, under File Contants, you'll see a Current VI's Path.
You can use this and the "Build Path" / "Strip Path" functions to build up the path to your VI and make it dynamic.
You may need to use a different function if the code is built into an executable. There are examples of different approaches on the forum.
08-29-2011 02:10 PM
Hello Vladiator,
To create a VI path at runtime you could use an Application Directory vi that will return the path to the directory that contains the current application and then a build path vi to specify the name of the vi you wish to call. Another way you could achieve the same end would be to use a vi property node from the calling vi to grab the path of the calling vi and then build the path as necessary with the subvi String name as the input. You will just have to insure that the calling vi and subvis are all in the same directory.
Regards,
Blayne Kettlewell
08-29-2011 03:32 PM
Here's a question related to that. If you are calling a VI dynamically from another VI, this VI than needs to be included into your installer as a seperate file, does it not? Otherwise, how would the .exe file work with it?
08-29-2011 03:53 PM - edited 08-29-2011 03:55 PM
@Ray.R wrote:
This is what the article says to do. You can do it using LV2009.
Unfortunately this has not solved the problem - I am still unable to open another subvi until this one is closed. Here is the sample I was using:
08-29-2011 03:57 PM
@MoReese wrote:
Here's a question related to that. If you are calling a VI dynamically from another VI, this VI than needs to be included into your installer as a seperate file, does it not? Otherwise, how would the .exe file work with it?
It is included automatically as a part of the Application (EXE). I believe it is added at the time of the EXE build. The installer just add the EXE to the installation package.
08-29-2011 04:06 PM
Vladiator wrote:It is included automatically as a part of the Application (EXE). I believe it is added at the time of the EXE build. The installer just add the EXE to the installation package.
What's included? The VI your calling? I know the .exe is included at install, but is the VI?
08-29-2011 04:11 PM
@MoReese wrote:
Vladiator wrote:It is included automatically as a part of the Application (EXE). I believe it is added at the time of the EXE build. The installer just add the EXE to the installation package.
What's included? The VI your calling? I know the .exe is included at install, but is the VI?
I do not have any VIs included in installer - only EXE file ( that suppose to include all Vis). Does this answer your question?
08-29-2011 07:35 PM - edited 08-29-2011 07:36 PM
MoReese is right..
to quote dbaechtel:
"In many applications, additional support files, that are not part of the EXE executable, need to be included in the same directory or in a related directory. In my case, some are template VIs for dynamic calls, other VIs and CTL files that those VIs require, some are data and ini files, some are template files needed for the DIAdem calls that are made from the EXE application, and the like. These "Always Include" files are files that are accessed as files by the EXE application and are expected to be located in the same directory as the EXE file or located nearby"
you can read about it here:
08-30-2011 07:40 AM
Thanks Ray for the thread. It's clear to me that any file listed under the "always included" window in the app builder will get loaded into the data folder, and not part of the .EXE file. That much I know. My question was regarding the dynamically loaded VIs, if they should be part of the "always included" as well, and it appear that it is the case.
08-30-2011 07:43 AM
@Vladiator wrote:
It is included automatically as a part of the Application (EXE). I believe it is added at the time of the EXE build. The installer just add the EXE to the installation package.
I don't believe it is included automatically as part of the .exe, because a dynamically called VI is not called from the application directly, but is a separate file and must be included in the app. Is this not correct?