05-31-2017 03:37 AM
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.
05-31-2017 07:02 AM
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!)
05-31-2017 07:15 AM
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.
05-31-2017 07:50 AM
Again, not sure if this helps but you can run
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').
05-31-2017 09:02 AM
Can you please provide me the sniped for LV15, as it throwns an error while dropping?
05-31-2017 07:08 PM
06-01-2017 02:26 AM
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?
06-01-2017 03:00 AM
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.
06-01-2017 03:34 AM
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...