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


IOperation Interface (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (SystemUI)  

IOperation Interface

Provides access to members that control Operations.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

IOperation is a interface that supports creating custom undo and redo operations in either ArcMap, ArcCatalog or standalone applications. An operation is an action, or group of actions, that may be undone or redone.

By creating a class that implements IOperation, you can use the Do method to execute some action, and then the Undo method to reset the action from the Do method. The Redo method follows this paradigm to support any specialized actions needed for managing the re-application of the Do method. 

By implementing your actions within the IOperation interface, you will automatically add them to the application's OperationStack

Members

Description
Read-only property CanRedo Indicates if the operation can be redone.
Read-only property CanUndo Indicates if the operation can be undone.
Method Do Performs the operation.
Read-only property MenuString The menu string.
Method Redo Redoes the operation.
Method Undo Undoes the operation.

CoClasses that implement IOperation

CoClasses and Classes Description
AddLayersOperation (esriArcMapUI) Add Layers Operation.
DrawLineOperation (esriArcScan) Raster Draw Line Operation.
DrawPolygonOperation (esriArcScan) Raster Draw Polygon Operation.
DrawRasterOperation (esriArcScan) Free hand draw raster operation.
DrawRectangleOperation (esriArcScan) Raster Draw Rectangle Operation.
ElementEditVerticesOperation (esriArcMapUI) Command for editing an elements vertices.
ElementNewOperation (esriArcMapUI) Command for adding new maps to a layout.
EngineSketchOperation (esriControls) Provides undo/redo capabilities for edit sketch modifications.
EraseRasterOperation (esriArcScan) Raster Erase Raster Operation.
GroupLayersOperation (esriArcMapUI) Group Layer Operation.
LimitedAdjustmentAreaOperation (esriEditorExt) Operation for setting the limited adjustment area.
MoveLayersOperation (esriArcMapUI) Move Layers Operation.
MoveMapsOperation (esriArcMapUI) Move Maps Operation.
NAEditOperation (esriNetworkAnalystUI) The network analysis edit operation.
NewLinkElementOperation (esriEditorExt) Operation for adding new links to a map.
ReferenceScaleOperation (esriArcMapUI) Reference Scale Operation.
RemoveLayerOperation (esriArcMapUI) Remove Layer Operation.
RemoveLayersOperation (esriArcMapUI) Remove Layers Operation.
RotateOperation (esriArcMapUI) Operation for handling rotation.
SchematicOperation (esriSchematicControls) Schematic Operation (allows Undo/Redo).
SelectFeaturesOperation (esriArcMapUI) Select Features Operation.
SketchOperation (esriEditor) Provides undo/redo capabilities for edit sketch modifications.
TrackPointOperation (esriEditorExt) Operation for tracking new shapes.
UngroupLayerOperation (esriArcMapUI) Ungroup Layer Operation.

Remarks

Verify the other classes that already implement IOperation, to avoid rewriting functions that already exist.

See Also

IOperationStack Interface