This example shows how you can implement undo/redo support for a custom tool menu item in TestStand so that a user can easily revert changes made to the sequence file within the tool. This example covers the following concepts
When developing a custom tool in TestStand which makes changes to a target sequence file, it is beneficial to allow the user to undo the changes if necessary. The TestStand API provides methods to allow you to specify the start and end of the edits made by the tool so that the undo operation reverts only the changes made by the tool.
In order to support Undo and Redo for an edit to the sequence file, follow these steps:
Engine.GetInternalOption(InternalOption_ApplicationManager)Since the ApplicationManager class is defined in the TestStand UI control API, you must use an ActiveX step to interact with it; only the core and adapter APIs are available in expressions.
Locals.undoItem = RunState.Engine.NewUndoItemCreator(EditKind_ChangeObject, RunState.InitialSelection.SelectedFile, "")
TestStand Tool Menu Item with Undo Support.zip
TestStand 2014 or Compatible
LabVIEW 2013 or Compatible (for modifying waveform editor dialog)
To install the example in the TestStand tool menu:
To use the Waveform Editor Tool