LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Inserting a RT menu into another

Hi

I have a VI which is inserted into a subpanel on the frontpanel of another VI.

I would like to insert the RT menu of the subpanel VI into the VI holding the subpanel VIs RT menu.

 

Note ! The menu items should be added to the menu an not replace existing menu items.

 

Know I can do it programatically but would like to do it by just passing.

 

Thank You

Regards Kahr
Certified LabVIEW Architect
CIM A/S
0 Kudos
Message 1 of 4
(2,509 Views)

Hi Kahr

 

Do you still search for a solution to this problem?

 

If you do, I will try to help you, but you need to explain the problem in a bit more details. 

You could i.e. attach some VI's to illlustrate the purpose and use these to further describe your problem.

Also I would like to know which version of LabVIEW you are using? 

 

As far as I understand you question you want to create a VI (the subVI) with has a Run Time menu created graphically i.e. by right clicking and selecting Advanced -> Run Time Shortcut menu.

Then when you embed this VI using a subpanel on an other VI you want LabVIEW to still remember the Run Time menu? If so, this behavior is what is the default action in LabVIEW 2011.

 

 

Best Regards

 

Anders Rohde

Application Engineer

National Instruments, DK

0 Kudos
Message 2 of 4
(2,469 Views)

Hi Rohde

 

Thank You. I am using 2009 and can't upgrade as the customer is using 2009.

 

The menu is dynamically created in the subpanel VI using the top level VIs "Curret VIs menu bar" which is parsed during the load of the subpanel VI.

See the example attached.

 

Now the question is how do I trace menu activations in the top level vi back into the event handler of the subpanel VI in a smart way ?

 

I know that I can program it i.e. by using event fired from the top level VI and handle these in the event handler in the subpanel VI.

But there might be a smarter or more generic way as I would like to be able to handle the menu in the sub panel VI if the passed refnum is invalid. As shown in the example.

 

Hopefully I make my self clear.

 

Thanks

 

 

 

Regards Kahr
Certified LabVIEW Architect
CIM A/S
0 Kudos
Message 3 of 4
(2,449 Views)

Hi Kahr

 

I think that cleared up the confusion.

 

As far as I (now) understand your question what you want is that when you in your subVIs event structure selects App Source:

<This VI> and  Events: Trigger on menu selection (user) then you would like to be able to choose your top level VI as source

instead of <This VI>, to be able to trigger on the top level VI in the subVI?

 

With the event structure this is not possible and you have to do it with a little programming to register the events, but it is

not that difficult.  

 

Good resources for invoking a VI with events from another VI can be found here:

KnowledgeBase: http://digital.ni.com/public.nsf/allkb/17ABD66EA8DAA0A986256FDA0067641E

Using the KB to solve the problem: https://decibel.ni.com/content/docs/DOC-9634

 

You should be able to modify them for your application. You can also use the examples to monitor a user event instead.

 

 

Best Regards

 

Anders Rohde

Application Engineer

National Instruments, DK

0 Kudos
Message 4 of 4
(2,435 Views)