LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Maximizing/minimizing clone VI front panel windows

I have a re-entrant sub-VI. My application launches many (typically nine) "clone VI" instances of this VI from my top-level VI.
All the clones execute in the background in parallel with execution of the top-level VI.
 
I want to keep the clone windows minimized until needed.
When the User clicks something on the top-level VI window (in my case a region in a Picture control)
to access one of the running clones, I want that clone VI window to restore up as the front-most window.
After interacting with the clone VI window, the User then uses Windows' "Minimize" box in the top-right corner to
minimize the clone front-panel window & return the User to the top-level VI front-panel window.
 
To try & achieve this, on launch I get each clone VIs to install their own "VI Reference number"
(obtained via Current VI's Path & Open VI Reference) into a global array of VI Reference numbers.
The top-level VI then indexes one of the elements of the array, obtains the reference number to the particular VI
and executes a Property: FrontPanel Window State: Maximized to bring up that front-panel window.
 
It doesn't work for me. The window that restores up is not the referenced clone front-panel window, it appears to
always be an un-cloned version of the VI, despite the fact that the reference numbers wired into the
"Property: FrontPanel Window State: Maximized" property node
are different and appear to correspond to the numbers installed into the global array by each clone VI.
 
What am I doing wrong here? How should I be managing clone VI windows differently?
0 Kudos
Message 1 of 7
(3,903 Views)

Sorry, previous post not quite clear.

When I try to use "Invoke: FrontPanel Open" I get the original (un-cloned) front-panel every time, regardless of which reference number

inputs to the node.

When I try to use "Property:Front Panel Window:State Standard" I get an error:

Error 1149: Cannot close or set the state of a closed front panel. The front panel must already be open before you close it or set its state.

0 Kudos
Message 2 of 7
(3,902 Views)
Sounds like the Top Level VI is losing the references. I think you have to keep all the references to launched VI's in the Top-Level VI if you want to do anything with them later.

Try making an array of the references and keep it in a shift register, when you need to open one, index the array and use the Property:Front Panel Window:State Standard



Message Edited by StevenD on 06-24-2008 11:00 PM
0 Kudos
Message 3 of 7
(3,896 Views)

(obtained via Current VI's Path & Open VI Reference)
This is your bug.

You should get the reference of the clone via the 'this VI' primitive on the application control palette. Now you are getting the reference to the master VI. (as you have noticed).

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 4 of 7
(3,890 Views)
Thanks, problem solved.
0 Kudos
Message 5 of 7
(3,877 Views)

I have also used the 'Call Chain' to get the name of the clone VI instance, and wired that string into the 'Open VI Reference' with success in LV14.

0 Kudos
Message 6 of 7
(3,267 Views)

@Alan_Bentz wrote:

I have also used the 'Call Chain' to get the name of the clone VI instance, and wired that string into the 'Open VI Reference' with success in LV14.


According to LabVIEW R&D this is an unintended feature and could cause problems.

 

https://decibel.ni.com/content/thread/12713?start=30&tstart=0

0 Kudos
Message 7 of 7
(3,184 Views)