com.esri.arcgis.editor
Interface IEditSketchExtension

All Superinterfaces:
Serializable
All Known Implementing Classes:
AnnotationEditExtension, DimensionEditExtension

public interface IEditSketchExtension
extends Serializable

Provides access to members that extend the edit sketch.

Superseded By

IEditSketchExtension2

When To Use

Edit sketch extensions let programmers alter the edit sketch geometry and edit sketch display feedback mechanism.

Product Availability

Available with ArcGIS Desktop.

See Also:
ISnapEnvironment, IEditProperties, IExtension, IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask), IEditor, IEditLayers, IEditTask.deactivate(), IEditAttributeProperties, IEditEvents2, IEditTask.onFinishSketch(), IDatasetEdit, IDatasetEditInfo, IEditTask.onDeleteSketch(), IEditTask.getName(), IEditEvents, Editor, IEditSketch

Method Summary
 void activate(IEditor editor)
          Called when the sketch extension is about to be used.
 boolean applies(IEditor editor)
          Indicates whether this extension applies to the current edit environment.
 void beforeStoreFeature(IFeature feature, IGeometry geometry)
          Lets the extension know the feature is about to be stored.
 IDisplayFeedback createFeedback()
          Called when a new feedback is needed.
 IGeometry createSketchGeometry(IFeature feature)
          The geometry that will be used in the sketch when modifying a feature.
 void deactivate()
          Called when the sketch extension is no longer needed.
 int getSketchGeometryType()
          The geometry type used for the edit sketch when creating new features.
 boolean isCanDeleteVertices()
          Indicates whether the sketch allows the deleting of vertices.
 boolean isCanInsertVertices()
          Indicates whether the sketch allows the inserting of additional vertices.
 boolean isCanMoveVertices()
          Indicates whether the sketch allows the moving of vertices.
 boolean isHasFeedback()
          Indicates whether the SketchExtension will use a custom feedback.
 void startFeedback(IPoint point)
          Called when the feedback needs to be started.
 void startFeedbackFromShape(IGeometry shape)
          Called when the feedback needs to be started using an existing geometry.
 IGeometry stopFeedback()
          Called when the feedback is no longer necessary.
 

Method Detail

applies

boolean applies(IEditor editor)
                throws IOException,
                       AutomationException
Indicates whether this extension applies to the current edit environment.

Remarks

The ::Applies() method is called by the controller when attempting to determine if the extension applies or not.

If more than one class is found implementing IEditSketchExtension the current tool or task will utilize the first extension which ::Applies() returns VARIANT_TRUE.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
editor - A reference to a com.esri.arcgis.editor.IEditor (in)
Returns:
The applies
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ISnapEnvironment, IEditProperties, IExtension, IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask), IEditor, IEditLayers, IEditTask.deactivate(), IEditAttributeProperties, IEditEvents2, IEditTask.onFinishSketch(), IDatasetEdit, IDatasetEditInfo, IEditTask.onDeleteSketch(), IEditTask.getName(), IEditEvents, Editor, IEditSketch

activate

void activate(IEditor editor)
              throws IOException,
                     AutomationException
Called when the sketch extension is about to be used.

Remarks

The ::Activate() method is called by the controller when the EditSktechExtension has been applied and is being initiated for use.

This method is called only if ::Applies() returns VARIANT_TRUE.

Use this method to obtain a reference to the controller (Editor).

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.
See Also:
ISnapEnvironment, IEditProperties, IExtension, IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask), IEditor, IEditLayers, IEditTask.deactivate(), IEditAttributeProperties, IEditEvents2, IEditTask.onFinishSketch(), IDatasetEdit, IDatasetEditInfo, IEditTask.onDeleteSketch(), IEditTask.getName(), IEditEvents, Editor, IEditSketch

deactivate

void deactivate()
                throws IOException,
                       AutomationException
Called when the sketch extension is no longer needed.

Remarks

The ::Deactivate() method is the last method called by the controller on the extension. Use it to release any unneeded memory reference pointers which the extension may have been holding on to.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ISnapEnvironment, IEditProperties, IExtension, IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask), IEditor, IEditLayers, IEditTask.deactivate(), IEditAttributeProperties, IEditEvents2, IEditTask.onFinishSketch(), IDatasetEdit, IDatasetEditInfo, IEditTask.onDeleteSketch(), IEditTask.getName(), IEditEvents, Editor, IEditSketch

beforeStoreFeature

void beforeStoreFeature(IFeature feature,
                        IGeometry geometry)
                        throws IOException,
                               AutomationException
Lets the extension know the feature is about to be stored.

Remarks

The ::BeforeStoreFeature() method is the final call before the feature and its geometry are stored into the base table. Use this method to obtain the sketch geometry, modify it if necessary, and pass it back to the feature.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
feature - A reference to a com.esri.arcgis.geodatabase.IFeature (in)
geometry - A reference to a com.esri.arcgis.geometry.IGeometry (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ISnapEnvironment, IEditProperties, IExtension, IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask), IEditor, IEditLayers, IEditTask.deactivate(), IEditAttributeProperties, IEditEvents2, IEditTask.onFinishSketch(), IDatasetEdit, IDatasetEditInfo, IEditTask.onDeleteSketch(), IEditTask.getName(), IEditEvents, Editor, IEditSketch

isCanInsertVertices

boolean isCanInsertVertices()
                            throws IOException,
                                   AutomationException
Indicates whether the sketch allows the inserting of additional vertices.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Returns:
The canInsert
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ISnapEnvironment, IEditProperties, IExtension, IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask), IEditor, IEditLayers, IEditTask.deactivate(), IEditAttributeProperties, IEditEvents2, IEditTask.onFinishSketch(), IDatasetEdit, IDatasetEditInfo, IEditTask.onDeleteSketch(), IEditTask.getName(), IEditEvents, Editor, IEditSketch

isCanDeleteVertices

boolean isCanDeleteVertices()
                            throws IOException,
                                   AutomationException
Indicates whether the sketch allows the deleting of vertices.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Returns:
The canDelete
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ISnapEnvironment, IEditProperties, IExtension, IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask), IEditor, IEditLayers, IEditTask.deactivate(), IEditAttributeProperties, IEditEvents2, IEditTask.onFinishSketch(), IDatasetEdit, IDatasetEditInfo, IEditTask.onDeleteSketch(), IEditTask.getName(), IEditEvents, Editor, IEditSketch

isCanMoveVertices

boolean isCanMoveVertices()
                          throws IOException,
                                 AutomationException
Indicates whether the sketch allows the moving of vertices.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Returns:
The canMove
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ISnapEnvironment, IEditProperties, IExtension, IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask), IEditor, IEditLayers, IEditTask.deactivate(), IEditAttributeProperties, IEditEvents2, IEditTask.onFinishSketch(), IDatasetEdit, IDatasetEditInfo, IEditTask.onDeleteSketch(), IEditTask.getName(), IEditEvents, Editor, IEditSketch

getSketchGeometryType

int getSketchGeometryType()
                          throws IOException,
                                 AutomationException
The geometry type used for the edit sketch when creating new features.

Remarks

The ::SketchGeometryType() method is used to specify the geometry type of the editsketch. Keep in mind that this can be different than the geometry type of the feature.

You may want the geometry type of the editsketch to be polygon yet ultimately store it in a featureclass of geometry type polyline.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Returns:
A com.esri.arcgis.geometry.esriGeometryType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ISnapEnvironment, IEditProperties, IExtension, IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask), IEditor, IEditLayers, IEditTask.deactivate(), IEditAttributeProperties, IEditEvents2, IEditTask.onFinishSketch(), IDatasetEdit, IDatasetEditInfo, IEditTask.onDeleteSketch(), IEditTask.getName(), IEditEvents, Editor, IEditSketch

createSketchGeometry

IGeometry createSketchGeometry(IFeature feature)
                               throws IOException,
                                      AutomationException
The geometry that will be used in the sketch when modifying a feature.

Remarks

Use this method when either 1) modifying an existing feature's geometry or 2) creating a new geometry for the EditSketch to use initially.

You can start with the geometry of the feature you have been given the reference to, possibly modify it, and pass it back out -or- create a completely new geometry for intial use by the EditSketch.

This is primarily used in conjunction with the modify task.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
feature - A reference to a com.esri.arcgis.geodatabase.IFeature (in)
Returns:
A reference to a com.esri.arcgis.geometry.IGeometry
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ISnapEnvironment, IEditProperties, IExtension, IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask), IEditor, IEditLayers, IEditTask.deactivate(), IEditAttributeProperties, IEditEvents2, IEditTask.onFinishSketch(), IDatasetEdit, IDatasetEditInfo, IEditTask.onDeleteSketch(), IEditTask.getName(), IEditEvents, Editor, IEditSketch

isHasFeedback

boolean isHasFeedback()
                      throws IOException,
                             AutomationException
Indicates whether the SketchExtension will use a custom feedback.

Remarks

Use this method to indicate whether the EditSketchExtension will provide the controller with a custom feedback object.

Returning a value of VARIANT_TRUE will indicate to the controller that it must call the ::CreateFeedback() method in order to create the custom feedback object to be used.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Returns:
The hasFeedback
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ISnapEnvironment, IEditProperties, IExtension, IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask), IEditor, IEditLayers, IEditTask.deactivate(), IEditAttributeProperties, IEditEvents2, IEditTask.onFinishSketch(), IDatasetEdit, IDatasetEditInfo, IEditTask.onDeleteSketch(), IEditTask.getName(), IEditEvents, Editor, IEditSketch

createFeedback

IDisplayFeedback createFeedback()
                                throws IOException,
                                       AutomationException
Called when a new feedback is needed.

Remarks

The ::CreateFeedback() method is called by the controller to initiate the creation of a custom feedback object associated to the EditSketchExtension .

Use this method to create your feedback object and pass it out so the Editor can use it.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Returns:
A reference to a com.esri.arcgis.display.IDisplayFeedback
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ISnapEnvironment, IEditProperties, IExtension, IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask), IEditor, IEditLayers, IEditTask.deactivate(), IEditAttributeProperties, IEditEvents2, IEditTask.onFinishSketch(), IDatasetEdit, IDatasetEditInfo, IEditTask.onDeleteSketch(), IEditTask.getName(), IEditEvents, Editor, IEditSketch

startFeedback

void startFeedback(IPoint point)
                   throws IOException,
                          AutomationException
Called when the feedback needs to be started.

Remarks

The ::StartFeedback() method is called by the controller after the custom feedback object has been created and is ready for use.

This method passes a copy of the Editor's ::CurrentLocation() as input. This point can be used as the starting point for the DisplayFeedback.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
point - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ISnapEnvironment, IEditProperties, IExtension, IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask), IEditor, IEditLayers, IEditTask.deactivate(), IEditAttributeProperties, IEditEvents2, IEditTask.onFinishSketch(), IDatasetEdit, IDatasetEditInfo, IEditTask.onDeleteSketch(), IEditTask.getName(), IEditEvents, Editor, IEditSketch

stopFeedback

IGeometry stopFeedback()
                       throws IOException,
                              AutomationException
Called when the feedback is no longer necessary.

Remarks

The ::StopFeedback() is called to when the feedback object is no longer needed for the operation.

Use this method to call ::Stop() on the feedback object and return the geometry of that object if necessary.

Example: If your custom feedback object is a type of INewBezierCurveFeedback calling ::Stop() will end feedback and return the geometry so it can be used as the geometry of the resulting feature.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Returns:
A reference to a com.esri.arcgis.geometry.IGeometry
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ISnapEnvironment, IEditProperties, IExtension, IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask), IEditor, IEditLayers, IEditTask.deactivate(), IEditAttributeProperties, IEditEvents2, IEditTask.onFinishSketch(), IDatasetEdit, IDatasetEditInfo, IEditTask.onDeleteSketch(), IEditTask.getName(), IEditEvents, Editor, IEditSketch

startFeedbackFromShape

void startFeedbackFromShape(IGeometry shape)
                            throws IOException,
                                   AutomationException
Called when the feedback needs to be started using an existing geometry.

Remarks

The ::StartFeedbackFromShape() method is called by the controller to determine if the custom feedback object will be supplied with an initial geometry.

Example: Pass in a circular geometry and resize it via the feedback to determine a buffer zone.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
shape - A reference to a com.esri.arcgis.geometry.IGeometry (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ISnapEnvironment, IEditProperties, IExtension, IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask), IEditor, IEditLayers, IEditTask.deactivate(), IEditAttributeProperties, IEditEvents2, IEditTask.onFinishSketch(), IDatasetEdit, IDatasetEditInfo, IEditTask.onDeleteSketch(), IEditTask.getName(), IEditEvents, Editor, IEditSketch