LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modeless SubVI does not load

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.

 

 

 

 

0 Kudos
Message 21 of 51
(1,645 Views)

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

0 Kudos
Message 22 of 51
(1,638 Views)

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?

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 23 of 51
(1,628 Views)

@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:

 

Non-modal Form

 

0 Kudos
Message 24 of 51
(1,620 Views)

@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.

0 Kudos
Message 25 of 51
(1,617 Views)

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?

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 26 of 51
(1,623 Views)

@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?

0 Kudos
Message 27 of 51
(1,620 Views)

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:

http://forums.ni.com/t5/LabVIEW/LabView-2010-Application-Builder-for-EXE-Always-Included-files/m-p/1...

 

0 Kudos
Message 28 of 51
(1,603 Views)

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.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 29 of 51
(1,589 Views)

@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?

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 30 of 51
(1,587 Views)