LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

execute a vi from another vi

hello
I have a message window Vi asking if you want execute a main Vi or not. If in the message window you click on start button the main Vi is executed, but i don't know how to close the message window leaving in execution the main. How can i do?
Thanks
0 Kudos
Message 1 of 5
(3,051 Views)

Hi smilegv,

 

Would you please be more specific. Also it will be more helpful If you attach your vi.

0 Kudos
Message 2 of 5
(3,034 Views)

This is an interesting way of doing things -- I'd say it was "backwards", but that's just my off-the-cuff reaction.  A more common way of handling this is for the Main routine to pop up a Dialog VI (or a simple Two-Button Dialog Box) asking the Yes/No question, and if No, the Main exits, while if Yes, it does whatever it is supposed to do.

 

But you want the Dialog to execute the Main, yet have the Dialog exit.  You can, in fact, do this (I think).  Have the Dialog ask the Question.  If the answer is Yes, you need to start the Main running as a separate, independent process. I'd suggest using Start Asynchronous Call (and Forget).  In any case, whether or not you start the Main, simply have the Dialog exit, which should have it "go out of existence".  If it still persists on your screen (looking like a stopped VI), look at its Windows properties and make sure that it is set to Close on exit.

 

BS

0 Kudos
Message 3 of 5
(3,011 Views)
It sounds like the same basic functionality of a splash screen. Do a search for that. There are numerous examples.
0 Kudos
Message 4 of 5
(3,001 Views)

You will also want to use the VI Invoke Node's Front Panel.Close method.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 5
(2,936 Views)