LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I flush the UNDO buffer?

When I run a vi from within the Labview environment I would like Labview to flush the UNDO buffer so that hitting CTL:Z will not have any effect. Can I do it programmetically? Right now it seems to flush it when the vi is saved.
0 Kudos
Message 1 of 6
(3,040 Views)
Maybe there is a way to use a filtering event for "key down?", then discard if ctrl-Z is pressed?
0 Kudos
Message 2 of 6
(3,040 Views)
I think the LV acts on the event first than passes on the event information to the vi. So even if I read the event info , I would guess that, the UNDO has already happened.
0 Kudos
Message 3 of 6
(3,040 Views)
No, this is not true. I just made a quick prototype to show that the ctrl-Z can be capured before it causes the undo action.

This is the point of a "filtering event"!
Message 4 of 6
(3,040 Views)
Another way to disable CTL-Z when a VI is running is to remove it from the menu. You can copy either the default or minimal menu, copy it to the custom, and then delete Undo from under Edit. Might as well delete Redo at the same time. With either the custom menu or trapping it with an event however, Undo will be active when the VI is stopped.
0 Kudos
Message 5 of 6
(3,040 Views)
Thanks. Yes it works.
0 Kudos
Message 6 of 6
(3,040 Views)