ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display subvi of subvi in main vi subpanel

In my application, I have to display hierarchical sub vis in main vi subpanel.(i.e I am displaying a subvi in subpanel, when I click a button on the subvi, it will call another subvi and that called subvi should open in subpanel of the main vi) How to do it? 

0 Kudos
Message 1 of 4
(2,193 Views)

You subVI needs to send a message to the main VI, telling it to change the VI in the subPanel.  The message content will need to include either the path to the VI or a reference to it.  I would use a queue to send the message, and for the data type of the queue, I would have a cluster containing a typedef'd enum (which specifies the message type), and a variant (containing message-specific data).

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 2 of 4
(2,148 Views)

Another alternative is to have it insert itself into the subpanel. You need to pass a reference to the subpanel to the appropriate subvi. Remove the existing vi and insert the new one. 

0 Kudos
Message 3 of 4
(2,139 Views)

@johntrich1971 wrote:

Another alternative is to have it insert itself into the subpanel. You need to pass a reference to the subpanel to the appropriate subvi. Remove the existing vi and insert the new one. 


I believe there is an example of this in LV example finder.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 4
(2,130 Views)