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


IEditSketchExtension2 Interface (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Editor > ESRI.ArcGIS.Editor > Interfaces > IE > IEditSketchExtension2 Interface
ArcGIS Developer Help

IEditSketchExtension2 Interface

Provides access to members that extend the edit sketch.

Product Availability

Available with ArcGIS Desktop.

When To Use

Edit sketch extensions let programmers alter the edit sketch geometry,edit sketch display feedback mechanism, and pre-sketch feedback. Implement this interface along with IExtension to create a custom edit sketch extension.

Members

Name Description
Method Activate Called when the sketch extension is about to be used.
Method Applies Indicates whether this extension applies to the current edit environment.
Method BeforeStoreFeature Lets the extension know the feature is about to be stored.
Read-only property CanDeleteVertices Indicates whether the sketch allows the deleting of vertices.
Read-only property CanInsertVertices Indicates whether the sketch allows the inserting of additional vertices.
Read-only property CanMoveVertices Indicates whether the sketch allows the moving of vertices.
Method CreateFeedback Called when a new feedback is needed.
Method CreatePreSketchFeedback Called when a new feedback is needed before the sketch starts.
Method CreateSketchGeometry The geometry that will be used in the sketch when modifying a feature.
Method Deactivate Called when the sketch extension is no longer needed.
Read-only property HasFeedback Indicates whether the SketchExtension will use a custom feedback.
Read-only property HasPreSketchFeedback Indicates whether the SketchExtension will use a custom feedback before the sketch starts.
Method OnKeyDown Called when a key is pressed.
Method OnKeyUp Called when a key is pressed.
Read-only property SketchGeometryType The geometry type used for the edit sketch when creating new features.
Method StartFeedback Called when the feedback needs to be started.
Method StartFeedbackFromShape Called when the feedback needs to be started using an existing geometry.
Method StartPreSketchFeedback Called when the feedback needs to be started.
Method StopFeedback Called when the feedback is no longer necessary.
Method StopPreSketchFeedback Called when the feedback needs to be stopped.

Classes that implement IEditSketchExtension2

Classes Description
AnnotationEditExtension An editor extension for creating and editing annotation features.

Remarks

Edit sketch extensions typically work as follows:

The current edit task calls each registered edit sketch extension�s Applies function; the first one to return True becomes the active extension and its Activate method is called. Each extension performs certain tests in its
Applies method to determine if it should be activated. This typically involves checking the current task, the current target layer, and, when modifying a feature, the currently selected features. Most extensions just override the Create New Feature task and the Modify Feature task.

Once an extension has become active, it sets the geometry type of the edit sketch. The extension then optionally sets up a new feedback mechanism; this typically involves the use of one of the feedback objects, such as NewLineCircleFeedback. For example, a custom edit sketch extension may create perfect circles by allowing users to enter a center point and another point defining the radius. When a user modifies the feature, they are presented with one point instead of an entire polygon; this limits them to only changing the radius, rather than adding new vertices and creating a shape that is an imperfect circle.

See Also

IDatasetEdit Interface | IDatasetEditInfo Interface | IEditSketch Interface | IEditTask.Activate Method | IEditor Interface | IEditTask.Deactivate Method | ISnapEnvironment Interface | IEditEvents2 Interface | IEditLayers Interface | IEditEvents Interface | IEditTask.Name Property | Editor Class | Editor Library | IEditTask.OnFinishSketch Method | IEditAttributeProperties Interface | IEditTask.OnDeleteSketch Method | IEditProperties Interface | IExtension Interface