This document is archived and information here might be outdated.  Recommended version.


IEditor.UndoOperation Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Editor)  

IEditor.UndoOperation Method

Undo an edit operation.

[Visual Basic .NET]
Public Sub UndoOperation ( _
)
[C#]
public void UndoOperation (
);

Product Availability

Available with ArcGIS Desktop.

Description

Rolls back all modifications made within an edit operation.

Remarks

Typically, UndoOperation and RedoOperation should be called within the context of an IOperation. Calling either of these directly, may corrupt the OperationStack. Instead, call Undo on IOperationStack to undo the last operation; this also moves the pointer down the stack, to the preceeding operation.  UndoOperation is a shortcut to calling IWorkspaceEdit::UndoOperation on the current edit workspace.

[C#]
 
private void UNDO()
{
  IMxDocument m_mxDoc;
  m_mxDoc.OperationStack.Undo();
}
[Visual Basic .NET]
Private Sub Undo()
  Dim pMxDoc As IMxDocument=m_application.Document
  pMxDoc.OperationStack.Undo()
End Sub

See Also

IEditor Interface