06-07-2020 04:05 AM
Hi all
I want insert sub menu vi in other VI,why not appearance in VI as below.
as sub vi insert other VI as below
Solved! Go to Solution.
06-07-2020 05:23 AM
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
06-09-2020 02:09 AM
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!!
06-09-2020 03:17 AM
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
06-09-2020 03:46 AM
Hi PsyenceFact,
It's work,thanks for your help.
06-09-2020 04:17 AM
No problem! Glad you got it sorted out.