LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Call subvi from exe

Solved!
Go to solution

Hi,

I call an exe with system exec block. I build that exe with Labview application builder. I need  to open the front panel of some sub-vi included and I need to close them when they finish. The sub-vi node setup is configuered in this way: show front panel when called; close afterwards if originally closed. At the very first time I didn't include those sub-vi in source file tab of the application builder, so the application opened a pop-up of error. Then I include them in the source file tab: now the program works, but the VIs are all opened when the application start. I don't like that. How could I reply exactly the behaviour of VI in the exe file?

Thanks

0 Kudos
Message 1 of 11
(1,613 Views)
Solution
Accepted by topic author FabioBone

Use property nodes within the subVI itself to open and close it's front panel.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 11
(1,609 Views)

Hello Mark,

 

Is it possible to close front panel of subvi from main VI??

CLAD
Passionate for LabVIEW
0 Kudos
Message 3 of 11
(1,482 Views)

Hi jatin,

 

yes.

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 4 of 11
(1,479 Views)

jatinpatel1489@gmail.com wrote:

Hello Mark,

 

Is it possible to close front panel of subvi from main VI??


Sure it is.  You just have to get a reference to the VI and use an invoke node to close the front panel.


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
Message 5 of 11
(1,477 Views)

@Mark_Yedinak wrote:

Use property nodes within the subVI itself to open and close it's front panel.


It's even better to use Invoke nodes. 😉

/Y

G# - Award winning reference based OOP for LV, for free! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
Message 6 of 11
(1,453 Views)

Its Great,

 

One more thing I am looking for is to get list of all subvis which are in memory. How do I do this ??

CLAD
Passionate for LabVIEW
0 Kudos
Message 7 of 11
(1,426 Views)

If you drop an empty property node it's linked to Application by default, look for Application - Exported VI's in memory, or something similar.

/Y

G# - Award winning reference based OOP for LV, for free! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 11
(1,422 Views)

My mistake in previous post actually I looking for list of subVIs having front panel opened. I should not have asked every small things but I am really not finding a way to get a list of opened sub vis. I would heartly appreciate if you could post a code or image for the same. 

CLAD
Passionate for LabVIEW
0 Kudos
Message 9 of 11
(1,404 Views)

That's a valid question, as it's not that simple. 🙂

You'll need to get the Application in memory list, loop through it and open all ref's (as shown above) and check their window property.

/Y

G# - Award winning reference based OOP for LV, for free! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
Message 10 of 11
(1,394 Views)