com.esri.arcgis.editor
Interface ISketchOperation2

All Superinterfaces:
Serializable
All Known Implementing Classes:
SketchOperation

public interface ISketchOperation2
extends Serializable

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

Remarks

ISketchOperation2 was added to provide a new implementation for the Finish method. The new implementation allows tools to give more information about what they modified; typically, the edited sketch point is passed back to clients listening to editor events (IEditEvents2).

For example, if a point is deleted from an edit sketch and ISketchOperation2::Finish is used to complete the operation, the deleted point is passed to clients responding to IEditEvents2::OnVertexDeleted.

Product Availability

Available with ArcGIS Desktop.

See Also:
IEnvelope, IEditAttributeProperties, IOperation

Method Summary
 void finish(IEnvelope invalEnv, int opType, Object data)
          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.
 

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,
            int opType,
            Object data)
            throws IOException,
                   AutomationException
Finishes the operation and puts it into the operation stack. Call this after the sketch has been modified.

Remarks

InvalEnv determines the envelope that will be invalidated (refreshed) when the sketch operation is completed. OpType determines which method on IEditor::IEditSketch2 will be fired to notify all listeners that the edit sketch has changed and give them appropriate information as to how the edit sketch was modified. Data is a variant value that can pass an IPoint as an argument to the appropriate method on IEditSketch2, such as OnVertexAdded.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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