AnnAddUndoNode method (Main Control)
Visual Basic
example
Visual
C++ 4.0 example
Syntax short AnnAddUndoNode ();
Overview: Refer to Implementing Annotations.
Remarks
(Document/Medical only) Manually adds a node to the undo stack.
The automation object automatically does this when changing, adding or deleting annotation objects. This method should be called before making changes programmatically to the annotation objects. Calling this method insures that the changes can be undone using the Undo menu item.
The number of operations that can be undone should be set in the AnnUndoDepth property before calling this method. If the AnnUndoDepth property is not set, a default of 5 is used.
This method adds an undo node to the automation object. When used with the AnnUndoEnable property, a lengthy operation, consisting of multiple steps, can be combined into one undo call to the AnnUndo method. To accomplish this, use the following steps:
1. Set the number of operations that can be undone in the AnnUndoDepth property. (The default for this property is 5.)
2. Call the AddUndoNode method to add an undo node to the container.
3. Disable the undo feature by setting the AnnUndoEnable property to FALSE.
4. Perform the operations to be combined into one undo.
5. Re-enable the undo feature by setting the AnnUndoEnable property to TRUE.
Now, all the operations can be undone with one call to the AnnUndo method instead of several calls to the AnnUndo method.
See Also
Elements: AnnUndoEnable property, AnnUndoDepth property, AnnUndo method
Topics: Annotations
Automation
Undoing Automation Operations