com.esri.arcgis.editor
Interface ISketchOperation

All Superinterfaces:
IOperation, Serializable
All Known Implementing Classes:
SketchOperation

public interface ISketchOperation
extends IOperation, Serializable

Provides access to members that control undo/redo capabilities for edit sketch modifications.

Remarks

Sketch operations are very similar to Editor operations. First, call Start to flag the beginning of the Sketch operation. Use the MenuString property to give the operation a name. Perform the edits. Call Finish to complete the edit operation. Finish requires an envelope parameter that is used to invalidate/refresh the display.

When To Use

Use sketch operations to provide undo and redo capabilities when making modifications to the edit sketch. For example, if you wanted to insert a new point in the middle of the edit sketch, create a sketch operation so the edit can be undone.

ISketchOperation derives from IOperation giving these additional methods: CanRedo, CanUndo, Do, Redo, Undo.

Product Availability

Available with ArcGIS Desktop.

See Also:
IEnvelope, IEditAttributeProperties, IOperation

Method Summary
 void finish(IEnvelope invalEnv)
          Finishes the operation and puts it into the operation stack.
 void setMenuString(String rhs1)
          The text that appears in the undo menu choice.
 void start(IEditor editor)
          Starts the operation, caching the existing sketch.
 
Methods inherited from interface com.esri.arcgis.systemUI.IOperation
esri_do, getMenuString, isCanRedo, isCanUndo, redo, undo
 

Method Detail

setMenuString

void setMenuString(String rhs1)
                   throws IOException,
                          AutomationException
The text that appears in the undo menu choice.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
rhs1 - The rhs1 (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

start

void start(IEditor editor)
           throws IOException,
                  AutomationException
Starts the operation, caching the existing sketch. Call this before modifying the sketch.

Remarks

All modifications made to an edit sketch should be made between calls to Start and Finish . Start caches the edit sketch's geometry in case the operation is undone; when this occurs, the modified geometry is replaced by the cached geometry.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
editor - A reference to a com.esri.arcgis.editor.IEditor (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

finish

void finish(IEnvelope invalEnv)
            throws IOException,
                   AutomationException
Finishes the operation and puts it into the operation stack. Call this after the sketch has been modified.

Remarks

All modifications made to an edit sketch should be made between calls to Start and Finish . Stop adds the sketch operation to the top of the operations stack. ArcMap use an operation stack to implement undo and redo.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
invalEnv - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.