LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

surface graph tab control (LV 7.1)

Hi:

Here is a good one.  I use a tab control for one of my VIs  The VI page switched to depends on the run-time menu item selected.  When the specific run-time menu item pertaining to one tab page is selected, an event-structure driven subVI is selected is embedded in a subpanel on that tab page.  This subvi uses the 3d surface graph.  When a new run-time menu item is selected, the subpanelled subvi is aborted to allow the code to proceed to a new code portion.  Everything is fine except when switching to a new tab page, the 3d surface graph shows thru onto this (and all other) pages (see attached).

I added a 'not visible' property node for the surface graph in the exit event case for the subpanelled subvi, which works fine IF clicking on 'Done' (stop) button for that subVI.  However, I was hoping to get rid of the 'Done' button as one ideally should not have to perform this extra step.  The 'abort VI' process, though, prevents the exit event driven case from triggering.  I thought about a 'User-event' triggering the exit case in the subVI based on the run-time menu changing in the main VI.  Was not to keen on making it this complicated or whether this is even a viable strategy.

The frustrating part is that everything would work as planned if the surface graph would not show thru to the other tab pages.  Thoughts are appreciated.

Sincerely,

Don
0 Kudos
Message 1 of 3
(2,698 Views)
I was able to solve the problem by first creating, and then generating, a user event to stop the subpanelled subVI, when the user selects a new run-time menu item. The user event is registered in the subpanelled subVI, and the registration node refnum is attached to the dynamic event terminal on the event structure for the subpanelled subVI.   I edited the exit event case of the subpanelled subVI so as to add this 'stop subVI user event' dynamic event to it. In this fashion, the exit event case of the subVI which contains the 'visible = F' property node for the surface graph is executed upon user event generation, and the surface graph becomes invisible.  The event generation is used in place of the abort VI invoke node I spoke of in the earlier post, and this is certainly a more desirable way to exit a subVI in general.

This is probably the correct way to do things in the first place, and it creates a workaround for, but still does not correct, the underlying problem of the surface graph showing thru on other tab pages.

Sincerely,

Don
Message 2 of 3
(2,677 Views)

Thank you Don!

Nice work-around.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 3
(2,666 Views)