08-30-2011 07:55 AM
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.
08-30-2011 08:36 AM
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
08-30-2011 09:19 AM
That's called "cheating"..
LOL!!
...but true.
08-30-2011 09:25 AM
@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.
08-30-2011 10:07 AM
You lost me....
Can you post your code?
08-30-2011 10:17 AM
@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.
08-30-2011 10:21 AM
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.
08-30-2011 10:27 AM
Your missing a VI. Can you attach "Selected Menu Item?"
08-30-2011 10:35 AM - edited 08-30-2011 10:36 AM
This will open your front panel. Is this what you want?
08-30-2011 10:35 AM
Sure - it is a modified "Menu Selection Demo.vi" from LN 2009 examples.
Here it is attached. Thanks!