LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modeless SubVI does not load

Dynamically called VIs are not automatically included because they are not loaded into memory when the application is compiled.  In other words, LabVIEW has no way of knowing that it should be included.  The compiler is smart enough to include only the files that are needed or used by all VI's and sub-vi's that are loaded with the main VI.

0 Kudos
Message 31 of 51
(1,524 Views)

Let me chime in with hair-splitting about what is included in the exe.

 

What has been said above is correct but there is an odd-ball situation not mentioned that used to be exploited.

 

You can have dynamic VIs that are part of the exe hiearchy and be called dynamcially. This used to be exploited by including an instance of the dynamic VI in a case that is never called. Being part of the code it is included. Being part of a never called case means they are never invoked implicitly. These VIs being part of the exe are loaded when the exe is loaded and therefore be called using the VI name only with no knowledge of the exact path.

 

Done with the trivia,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 32 of 51
(1,520 Views)

That's called "cheating"..

LOL!! 

 

...but true.

 

0 Kudos
Message 33 of 51
(1,508 Views)

@Ray.R wrote:

Dynamically called VIs are not automatically included because they are not loaded into memory when the application is compiled.  In other words, LabVIEW has no way of knowing that it should be included.  The compiler is smart enough to include only the files that are needed or used by all VI's and sub-vi's that are loaded with the main VI.


Looks like I am not calling a subvi dynamically - how would I do that from the main vi menu? I was not able to find any LV examples.I am still calling the subvi from the menu  by placing the icon of the subvi to the menu processing loop for a specific menu item.

0 Kudos
Message 34 of 51
(1,503 Views)

You lost me....

 

Can you post your code?

0 Kudos
Message 35 of 51
(1,494 Views)

@Vladiator wrote:

@Ray.R wrote:

Dynamically called VIs are not automatically included because they are not loaded into memory when the application is compiled.  In other words, LabVIEW has no way of knowing that it should be included.  The compiler is smart enough to include only the files that are needed or used by all VI's and sub-vi's that are loaded with the main VI.


Looks like I am not calling a subvi dynamically - how would I do that from the main vi menu? I was not able to find any LV examples.I am still calling the subvi from the menu  by placing the icon of the subvi to the menu processing loop for a specific menu item.


He has a run-time menu and he is calling the VI from this menu (i.e. File>>Load .INI).  His VI is evidently tucked inside of a case structure and the case gets executed when the menu item is select; therefore, the VI is being called from his main.  I believe I have it right.

-----------------------------------------------------------------------------------------
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 36 of 51
(1,489 Views)

Here is the code. I placed it on root C:\ to make it simple. Run Main.vi and select File > Modeless menu item. I was unable to open the modeless form.

0 Kudos
Message 37 of 51
(1,483 Views)

Your missing a VI.  Can you attach "Selected Menu Item?"

-----------------------------------------------------------------------------------------
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 38 of 51
(1,477 Views)

This will open your front panel.  Is this what you want?

 

open fp.png

 

 

-----------------------------------------------------------------------------------------
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 39 of 51
(1,474 Views)

Sure - it is a modified "Menu Selection Demo.vi" from LN 2009 examples.

 

Here it is attached. Thanks!

0 Kudos
Message 40 of 51
(1,473 Views)