LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview menu

Solved!
Go to solution

Hi all

  I want insert sub menu vi in other VI,why not appearance in VI as below.

 

sageliuliu_0-1591519665183.png

as sub vi insert other VI as below

sageliuliu_1-1591519908965.png

 

 

0 Kudos
Message 1 of 6
(2,718 Views)

Hi sageliuliu,

 

When you put your code in a subVI, Current VI's Menubar no longer returns a reference to the main VI menu.  Instead, it returns a reference to the subVI menu!  You need to leave Current VI's Menubar in your main VI and pass the reference as an input to the subVI.

 

PsyenceFact

0 Kudos
Message 2 of 6
(2,694 Views)

Hi PsyenceFact

    Thanks for your reply,I don't know how to setup with that code and upload it,please help me point out,thanks!!

Download All
0 Kudos
Message 3 of 6
(2,607 Views)
Solution
Accepted by topic author Sam.Huang

I'm still running LV2015 so can't open your VIs.  No matter, here's a little example that shows how it's done.  Run Submenu example 1.vi.  In this, the menu reference is obtained and passed to Submenu example 2.vi.  All the menu setup is done there.

 

I've also included an event structure to catch the user menu selections.  All it does is check whether the menu tag contains the string "Sub" and, if so, toggle the checkmark.

 

Hope this is useful.

 

PsyenceFact

Download All
0 Kudos
Message 4 of 6
(2,597 Views)

Hi PsyenceFact,

   It's work,thanks for your help.

0 Kudos
Message 5 of 6
(2,591 Views)

No problem!  Glad you got it sorted out.

0 Kudos
Message 6 of 6
(2,586 Views)