LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Run-Time Menu inside Sub-Panel

Hi guys,

 

circumstances

 

Inside a subpanel, a block diagram of another vi is loaded

 

what i want to do

 

Show the run-time menu of this block diagram inside the subpanel

 

why i want to do it

 

I want to call the "Show hierarchy" Options on the vi which blockdiagram is loaded inside the subpanel

 

Other ideas

 

To override the Hosts run-time menu ref with the one from inside the subpanel <- possible?

 

To write some code around <- i dont want to

 

If anyone knows a solution, thanks much in advance. 

0 Kudos
Message 1 of 9
(3,973 Views)

I'm not sure how much interactivity you need, but does this work for you? You should be able to drag-drop this onto a 2016 or later block diagram, or alternatively you can find it on the Invoke Node for the Application (i.e. with nothing wired and default settings). It's not on the standard list as far as I know, but I'm not certain which .ini key you'd need to see it (you can drop it even if you wouldn't normally see it though!)

 

vihierarchy.png


GCentral
0 Kudos
Message 2 of 9
(3,930 Views)

Unfortunatly yes, i want the menu to be interactive.

 

I was wondering why the properties in my snipit wont work like i expected. but obviously a subpanel is displaying the Panel, where the menu is not a part of the Panel itself....

 

i worked around other way but, would be interesting to know how labview handles this.

0 Kudos
Message 3 of 9
(3,925 Views)

Again, not sure if this helps but you can run hier2.png

to programmatically open the VI Hierarchy window. The tag is possibly different in other languages than English, so you can traverse through the menu tags using Get Menu Item Information and changing the Item Tag to the first result you want to browse under (for me, it was 'APP_VIEW').


GCentral
0 Kudos
Message 4 of 9
(3,917 Views)

Can you please provide me the sniped for LV15, as it throwns an error while dropping?

 

 

0 Kudos
Message 5 of 9
(3,915 Views)

I'm not sure if I can backsave a snippet, but here's the VI saved for 2015.

 


GCentral
0 Kudos
Message 6 of 9
(3,903 Views)

Yeah that is neat!

 

One more question, how to aquire a reference for this invoke node from a vi reference of a vi which is not opened?

0 Kudos
Message 7 of 9
(3,894 Views)

You can use the 'Owning Application' property node from a VI Reference (even if not open) to get the Application Reference, but it doesn't highlight that VI when the Hierarchy window opens, which is I'm guessing what you wanted. I can't see a way to do that in the real window, and you already said the image isn't sufficient. I'm not sure where you can go from there, unless you're happy with the implementation you already have.

 

That isn't to say there isn't a better way (there usually is...). I just haven't found it yet.


GCentral
0 Kudos
Message 8 of 9
(3,889 Views)

Ah, havent found this :D... Well i guess this Needs to work out.

 

I was also looking for a way to call:

 

APP_THIS_VIS_CALLERS

APP_THIS_VIS_SUBVIS

 

but unfortunatly, it doesnt look like that it works the way i hoped it would...

0 Kudos
Message 9 of 9
(3,881 Views)