com.esri.arcgis.controls
Class EngineEditor

java.lang.Object
  extended by com.esri.arcgis.controls.EngineEditor
All Implemented Interfaces:
IEngineEditLayers, IEngineEditor, IEngineEditProperties, IEngineEditProperties2, IEngineEditSketch, IEngineSnapEnvironment, com.esri.arcgis.interop.RemoteObjRef, IExtension, ISupportErrorInfo, Serializable

public class EngineEditor
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IEngineEditor, IEngineEditSketch, IEngineSnapEnvironment, IEngineEditProperties, IEngineEditProperties2, IEngineEditLayers, ISupportErrorInfo, IExtension

A singleton object representing the Engine editing environment.

Description

The EngineEditor is a singleton object (only one instance of the EngineEditor object is supported per thread) that manages the editing environment for features stored in the ESRI vector geographic datasets: geodatabases and shapefiles. Use the EngineEditor object to control the editing properties, establish a snapping environment, manage snap agents, create edit operations, create and manage an edit sketch, set the current task, set the target layer and to respond to editor events.

Product Availability

Available with ArcGIS Engine.

Singleton:

This type is a singleton.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.esri.arcgis.system.IExtension
IID, IID7f657ec9_dbf1_11d2_9f2f_00c04f6bc69e, xxDummy
 
Constructor Summary
EngineEditor()
          Constructs a EngineEditor using ArcGIS Engine.
EngineEditor(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
EngineEditor theEngineEditor = (EngineEditor) obj;
 
Method Summary
 void abortOperation()
          Aborts an edit operation.
 void addIEngineEditEventsListener(IEngineEditEvents theListener)
          addIEngineEditEventsListener.
 void addPoint(IPoint point, boolean allowUndo)
          Adds a point to the edit sketch.
 void addSnapAgent(IEngineSnapAgent snapAgent)
          Adds a new snap agent to the snap environment.
 void addTask(IEngineEditTask task)
          Adds a task to the EngineEditor.
 void clearSnapAgents()
          Removes all snap agents.
 void enableUndoRedo(boolean enabled)
          Indicates if undo/redo capabilities are enabled.
 boolean equals(Object o)
          Compare this object with another
 void finishSketch()
          Completes the current edit sketch.
 void finishSketchPart()
          Completes a part for the current edit sketch.
 double getAngularCorrectionOffset()
          Angular Correction Offset.
 int getAngularUnitPrecision()
          Precision used to display angular units.
static String getClsid()
          getClsid.
 int getCurrentSubtype()
          The sub type for new features in the CurrentLayer.
 IEngineEditTask getCurrentTask()
          The current edit task.
 double getCurrentZ()
          Current Z value for the edit sketch.
 int getDirectionType()
          Direction Type.
 int getDirectionUnits()
          Direction Units.
 double getDistanceCorrectionFactor()
          Distance Correction Factor.
 IPoint getEditLocation()
          A point that can be used by any custom editing commands.
 IEnumFeature getEditSelection()
          The selected features that are editable.
 int getEditSessionMode()
          The current edit session mode.
 int getEditState()
          The EngineEditor's current edit state.
 IWorkspace getEditWorkspace()
          The workspace being edited.
 IGeometry getGeometry()
          Geometry stored in the edit sketch.
 int getGeometryType()
          Type of the geometry stored in the edit sketch.
 IPoint getLastPoint()
          The last point in the edit sketch.
 IMap getMap()
          The map being edited.
 String getName()
          The name of the extension.
 int getPart()
          The index of the current part of the sketch.
 int getReportPrecision()
          Controls the number of decimal places the editor reports numbers with.
 int getSegment()
          The index of the current segment of the sketch.
 IMarkerSymbol getSelectedVertexSymbol()
          Symbol used to draw the active vertex of the edit sketch.
 int getSelectionCount()
          The number of selected features that are editable.
 ILineSymbol getSketchSymbol()
          Symbol used to draw the lines of the edit sketch.
 IMarkerSymbol getSketchVertexSymbol()
          Symbol used to draw the vertices of the edit sketch.
 IEngineSnapAgent getSnapAgent(int index)
          A snap agent at the given index.
 int getSnapAgentCount()
          The number of active snap agents.
 IMarkerSymbol getSnapSymbol()
          Symbol used to draw the snap location.
 double getSnapTolerance()
          The snap tolerance, measured in pixels or map units.
 int getSnapToleranceUnits()
          The units used for the snap tolerance.
 int getStickyMoveTolerance()
          Controls the sticky move tolerance.
 int getStreamGroupingCount()
          Controls the number of points to group together when streaming.
 double getStreamTolerance()
          Controls the streaming tolerance, measured in map units.
 ILayer getTargetLayer()
          The editor's target layer.
 IEngineEditTask getTask(int index)
          The edit task at the specified index.
 IEngineEditTask getTaskByUniqueName(String uniqueName)
          Retrieves a task by UniqueName from the EngineEditor.
 int getTaskCount()
          The number of edit tasks.
 int getVertex()
          The index of the current vertex of the sketch.
 boolean hasEdits()
          Indicates if edits have been made.
 int hashCode()
          the hashcode for this object
 IFeatureLayer IEngineEditLayers_getTargetLayer()
          The EngineEditor's target layer that new features are added to.
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 void invertAgent(IPoint location, int hdc)
          Draws the EngineEditor's snapping agent.
 boolean isAutoSaveOnVersionRedefined()
          Indicates whether the stop editing process should automatically reconcile an edit session and save the version without notification.
 boolean isEditable(IFeatureLayer layer)
          Indicates if the specific feature layer is editable.
 boolean isSnapTips()
          Indicates whether to show the snap tips.
 boolean isStretchGeometry()
          Indicates if the edit sketch is stretched when one of its vertices is moved.
 boolean isUseGroundToGrid()
          Indicates whether to use Ground to Grid.
 boolean isZAware()
          Indicates whether the edit sketch geometry can contain Zs.
 void modifySketch()
          Notifies listeners that the sketch has been changed.
 void refreshSketch()
          Invalidates the portion of the display that is occupied by the sketch.
 void removeIEngineEditEventsListener(IEngineEditEvents theListener)
          removeIEngineEditEventsListener.
 void removeSnapAgent(int index)
          Removes the snap agent at the given index.
 void setAngularCorrectionOffset(double angOffset)
          Angular Correction Offset.
 void setAngularUnitPrecision(int auPrecision)
          Precision used to display angular units.
 void setAutoSaveOnVersionRedefined(boolean stretch)
          Indicates whether the stop editing process should automatically reconcile an edit session and save the version without notification.
 void setCurrentTaskByRef(IEngineEditTask task)
          The current edit task.
 void setCurrentZ(double z)
          Current Z value for the edit sketch.
 void setDirectionType(int dirType)
          Direction Type.
 void setDirectionUnits(int dirUnits)
          Direction Units.
 void setDistanceCorrectionFactor(double distFactor)
          Distance Correction Factor.
 void setEditLocation(int x, int y)
          Sets the part, segment and vertex of the edit sketch at the x,y location.
 void setEditSessionMode(int mode)
          The current edit session mode.
 void setGeometryByRef(IGeometry geometry)
          Geometry stored in the edit sketch.
 void setGeometryType(int geomType)
          Type of the geometry stored in the edit sketch.
 void setReportPrecision(int numDecs)
          Controls the number of decimal places the editor reports numbers with.
 void setSelectedVertexSymbolByRef(IMarkerSymbol symbol)
          Symbol used to draw the active vertex of the edit sketch.
 void setSketchSymbolByRef(ILineSymbol symbol)
          Symbol used to draw the lines of the edit sketch.
 void setSketchVertexSymbolByRef(IMarkerSymbol symbol)
          Symbol used to draw the vertices of the edit sketch.
 void setSnapSymbolByRef(IMarkerSymbol symbol)
          Symbol used to draw the snap location.
 void setSnapTips(boolean tips)
          Indicates whether to show the snap tips.
 void setSnapTolerance(double tol)
          The snap tolerance, measured in pixels or map units.
 void setSnapToleranceUnits(int units)
          The units used for the snap tolerance.
 void setStickyMoveTolerance(int tol)
          Controls the sticky move tolerance.
 void setStreamGroupingCount(int tol)
          Controls the number of points to group together when streaming.
 void setStreamTolerance(double tol)
          Controls the streaming tolerance, measured in map units.
 void setStretchGeometry(boolean stretch)
          Indicates if the edit sketch is stretched when one of its vertices is moved.
 void setTargetLayer(IFeatureLayer layer, int subType)
          Sets the EngineEditor's target layer and subtype for new features.
 void setUseGroundToGrid(boolean g2g)
          Indicates whether to use Ground to Grid.
 void setZAware(boolean aware)
          Indicates whether the edit sketch geometry can contain Zs.
 void shutdown()
          Shuts down the extension.
 boolean snapPoint(IPoint point)
          Attempts to snap the point using the current snap environment.
 void startEditing(IWorkspace workspace, IMap map)
          Starts an edit session.
 void startOperation()
          Starts an edit operation.
 void startup(Object initializationData)
          Starts up the extension with the given initialization data.
 void stopEditing(boolean saveChanges)
          Stops an edit session.
 void stopOperation(String operationName)
          Stops an edit operation.
 void vertexAdded(IPoint point)
          Notifies listeners that a vertex has been added to the sketch.
 void vertexDeleted(IPoint point)
          Notifies listeners that a vertex has been deleted from the sketch.
 void vertexMoved(IPoint point)
          Notifies listeners that a vertex has been moved in the sketch.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

EngineEditor

public EngineEditor()
             throws IOException,
                    UnknownHostException
Constructs a EngineEditor using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

EngineEditor

public EngineEditor(Object obj)
             throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
EngineEditor theEngineEditor = (EngineEditor) obj;

Construct a EngineEditor using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to EngineEditor.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

addIEngineEditEventsListener

public void addIEngineEditEventsListener(IEngineEditEvents theListener)
                                  throws IOException
addIEngineEditEventsListener. Listen to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.controls.IEngineEditEvents interface.
Throws:
IOException - If there are communications problems.

removeIEngineEditEventsListener

public void removeIEngineEditEventsListener(IEngineEditEvents theListener)
                                     throws IOException
removeIEngineEditEventsListener. Stop listening to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.controls.IEngineEditEvents interface.
Throws:
IOException - If there are communications problems.

getEditState

public int getEditState()
                 throws IOException,
                        AutomationException
The EngineEditor's current edit state.

Description

The EditState property communicates the current edit state of the EngineEditor. The esriEngineEditState constants provide the valid edit states.

Product Availability

Available with ArcGIS Engine.

Specified by:
getEditState in interface IEngineEditor
Returns:
A com.esri.arcgis.controls.esriEngineEditState constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getEditWorkspace

public IWorkspace getEditWorkspace()
                            throws IOException,
                                   AutomationException
The workspace being edited.

Description

The EditWorkspace property returns a reference to the workspace being edited. Only one workspace can be edited at a time. The EditWorkspace property is set by the IEngineEditor::StartEditing method and the ControlsEditingStartCommand.

Product Availability

Available with ArcGIS Engine.

Specified by:
getEditWorkspace in interface IEngineEditor
Returns:
A reference to a com.esri.arcgis.geodatabase.IWorkspace
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

startEditing

public void startEditing(IWorkspace workspace,
                         IMap map)
                  throws IOException,
                         AutomationException
Starts an edit session.

Description

Starts an editing session using the specified IMap and IWorkspace parameters. Only one map and workspace can be edited at a time.

Remarks

This method fires the IEngineEditEvents::OnStartEditing, IEngineEditEvents::OnSelectionChanged, IEngineEditEvents::OnTargetLayerChanged and IEngineEditEvents::OnSketchModified events.

Product Availability

Available with ArcGIS Engine.

Specified by:
startEditing in interface IEngineEditor
Parameters:
workspace - A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)
map - A reference to a com.esri.arcgis.carto.IMap (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

stopEditing

public void stopEditing(boolean saveChanges)
                 throws IOException,
                        AutomationException
Stops an edit session.

Description

Stops an editing session. Changes can be saved by setting the saveChanges parameter to be True or discarded by setting the parameter to be False.

StopEditing also clears all snap agents and unselects all selected features.

Remarks

This method fires the IEngineEditEvents::OnBeforeStopEditing, IEngineEditEvents::OnStopEditing and IEngineEditEvents::OnTargetLayerChanged events.

Product Availability

Available with ArcGIS Engine.

Specified by:
stopEditing in interface IEngineEditor
Parameters:
saveChanges - The saveChanges (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

hasEdits

public boolean hasEdits()
                 throws IOException,
                        AutomationException
Indicates if edits have been made.

Description

This property reports whether or not any edits have been made in the current edit session. For example, if this property returns False then editing can be stopped without saving the changes by calling IEngineEditor::StopEditing with the False parameter.

Remarks





Product Availability

Available with ArcGIS Engine.

Specified by:
hasEdits in interface IEngineEditor
Returns:
The hasEdits
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

startOperation

public void startOperation()
                    throws IOException,
                           AutomationException
Starts an edit operation.

Description

StartOperation marks the beginning of an edit operation. To provide undo/redo capability programmatically all edits must be performed within an edit operation.


Calling IEngineEditor::StopOperation completes an edit operation which is then added to the top of the operation stack. The operation stack is how ArcGIS Engine implements Undo and Redo. When using StartOperation, proper error handling, including the use of IEgineEditor::AbortOperation, is neccessary.


Edit operations cannot be nested; calling StartOperation within another operation will raise an error.

Remarks

This method fires the IEngineEditEvents::OnStartOperation event.

Product Availability

Available with ArcGIS Engine.

Specified by:
startOperation in interface IEngineEditor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

abortOperation

public void abortOperation()
                    throws IOException,
                           AutomationException
Aborts an edit operation.

Description

AbortOperation should be used to terminate the edit operation without saving any changes. Those changes that were made after IEngineEditor::StartOperation was called are undone, and nothing is added to the operation stack.

You may wish to test that your edit operation is valid before saving any changes. If the test fails you should call AbortOperation instead of IEngineEditor::StopOperation.

Remarks

This method fires theIEngineEditEvents::OnSelectionChanged and IEngineEditEvents::OnAbort events.

Product Availability

Available with ArcGIS Engine.

Specified by:
abortOperation in interface IEngineEditor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

stopOperation

public void stopOperation(String operationName)
                   throws IOException,
                          AutomationException
Stops an edit operation.

Description

StopOperation marks the end of an edit operation. Calling StopOperation creates an edit operation that is added to the top of the operation stack. The operation stack is how ArcGIS Engine implements Undo and Redo.

When using IEngineEditor::StartOperation proper handling of errors, including the use of IEngineEditor::AbortOperation, is neccessary.

The string argument allows the operation to be identified on the operaton stack.

Remarks

This method fires the IEngineEditEvents::OnBeforeStopOperation and IEngineEditEvents::OnStopOperation events.

Product Availability

Available with ArcGIS Engine.

Specified by:
stopOperation in interface IEngineEditor
Parameters:
operationName - The operationName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

enableUndoRedo

public void enableUndoRedo(boolean enabled)
                    throws IOException,
                           AutomationException
Indicates if undo/redo capabilities are enabled.

Description

Use EnableUndoRedo to control whether edits to features can be rolled back. When set to True, an edit made programmatically must be performed within an edit operation so that it can be rolled back. When set to False, no individual edit operation can be undone.

Calling IEngineEditor::StopEditing with a False parameter will discard all of the edits made in the edit session.

By default EnableUndoRedo is True. The method can only be called when there is an active edit session and only applies to edit operations; it does not apply to sketch operations.

Product Availability

Available with ArcGIS Engine.

Specified by:
enableUndoRedo in interface IEngineEditor
Parameters:
enabled - The enabled (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getEditSelection

public IEnumFeature getEditSelection()
                              throws IOException,
                                     AutomationException
The selected features that are editable.

Description

This property returns all of the currently selected features that belong to editable layers. Use this property when creating an editing tool or command that works with the current selection.

Product Availability

Available with ArcGIS Engine.

Specified by:
getEditSelection in interface IEngineEditor
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumFeature
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSelectionCount

public int getSelectionCount()
                      throws IOException,
                             AutomationException
The number of selected features that are editable.

Description

This property returns total number of selected features belonging to all editable layers in a map.

Product Availability

Available with ArcGIS Engine.

Specified by:
getSelectionCount in interface IEngineEditor
Returns:
The selection
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTaskCount

public int getTaskCount()
                 throws IOException,
                        AutomationException
The number of edit tasks.

Description

This property returns the number of engine edit tasks that the EngineEditor currently has loaded.

For example, use TaskCount to loop through all available tasks.

Product Availability

Available with ArcGIS Engine.

Specified by:
getTaskCount in interface IEngineEditor
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTask

public IEngineEditTask getTask(int index)
                        throws IOException,
                               AutomationException
The edit task at the specified index.

Product Availability

Available with ArcGIS Engine.

Specified by:
getTask in interface IEngineEditor
Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.controls.IEngineEditTask
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCurrentTaskByRef

public void setCurrentTaskByRef(IEngineEditTask task)
                         throws IOException,
                                AutomationException
The current edit task.

Product Availability

Available with ArcGIS Engine.

Specified by:
setCurrentTaskByRef in interface IEngineEditor
Parameters:
task - A reference to a com.esri.arcgis.controls.IEngineEditTask (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCurrentTask

public IEngineEditTask getCurrentTask()
                               throws IOException,
                                      AutomationException
The current edit task.

Description

Use this property to check or change the EngineEditor's current task.

When an edit sketch is completed the IEngineEditTask::OnFinishSketch method of the current engine edit task uses the geometry stored in IEngineEditSketch::Geometry to perform some action (e.g. store any created features)

The IEngineEditEvents::OnCurrentTaskChanged event is fired when this property is set or when a different task is selected using the ControlsEditingTaskToolControl.

Product Availability

Available with ArcGIS Engine.

Specified by:
getCurrentTask in interface IEngineEditor
Returns:
A reference to a com.esri.arcgis.controls.IEngineEditTask
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMap

public IMap getMap()
            throws IOException,
                   AutomationException
The map being edited.

Description

Use this property to get a reference to the map being edited.

An application may contain more than one MapControl encapsulating a Map CoClass. Only the editable layers in one Map may be edited at a time. When IEngineEditor::StartEditing is called, an edit session begins on a specific workspace in a specific map.

Product Availability

Available with ArcGIS Engine.

Specified by:
getMap in interface IEngineEditor
Returns:
A reference to a com.esri.arcgis.carto.IMap
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

invertAgent

public void invertAgent(IPoint location,
                        int hdc)
                 throws IOException,
                        AutomationException
Draws the EngineEditor's snapping agent.

Description

Call InvertAgent to draw the EngineEditor's snap agent at the location specified by the required point parameter. A device handle is also required. The agent is typically used to display the mouse location or a location based on a constraint when adding points to an edit sketch. Call InvertAgent a second time with the same point parameter to draw over and erase the previous agent.

Product Availability

Available with ArcGIS Engine.

Specified by:
invertAgent in interface IEngineEditor
Parameters:
location - A reference to a com.esri.arcgis.geometry.IPoint (in)
hdc - The hdc (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addTask

public void addTask(IEngineEditTask task)
             throws IOException,
                    AutomationException
Adds a task to the EngineEditor.

Description

This method adds an engine edit task to the collection of edit tasks managed by the EngineEditor singleton object.

Product Availability

Available with ArcGIS Engine.

Specified by:
addTask in interface IEngineEditor
Parameters:
task - A reference to a com.esri.arcgis.controls.IEngineEditTask (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTaskByUniqueName

public IEngineEditTask getTaskByUniqueName(String uniqueName)
                                    throws IOException,
                                           AutomationException
Retrieves a task by UniqueName from the EngineEditor.

Description

Retrieves the engine edit task that is uniquely identified by it's IEngineEditTask::UniqueName string.

For example, the out-of-the-box "Create New Feature" and "Modify Feature" engine edit tasks have IEngineEditTask::UniqueName properties of "ControlToolsEditing_CreateNewFeatureTask" and "ControlToolsEditing_ModifyFeatureTask" respectively.

Product Availability

Available with ArcGIS Engine.

Specified by:
getTaskByUniqueName in interface IEngineEditor
Parameters:
uniqueName - The uniqueName (in)
Returns:
A reference to a com.esri.arcgis.controls.IEngineEditTask
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setEditSessionMode

public void setEditSessionMode(int mode)
                        throws IOException,
                               AutomationException
The current edit session mode.

Product Availability

Available with ArcGIS Engine.

Specified by:
setEditSessionMode in interface IEngineEditor
Parameters:
mode - A com.esri.arcgis.controls.esriEngineEditSessionMode constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getEditSessionMode

public int getEditSessionMode()
                       throws IOException,
                              AutomationException
The current edit session mode.

Description

Use this property to check or set the edit session mode of the EngineEditor. The edit session can be either versioned or non-versioned. This property only applies when editing an SDE Workspace.

The esriEngineEditSessionMode constants provide the valid edit session modes.

Product Availability

Available with ArcGIS Engine.

Specified by:
getEditSessionMode in interface IEngineEditor
Returns:
A com.esri.arcgis.controls.esriEngineEditSessionMode constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getGeometryType

public int getGeometryType()
                    throws IOException,
                           AutomationException
Type of the geometry stored in the edit sketch.

Description

Use this property in conjunction with the IEngineEditSketch::Geometry property to manage the geometry inside the edit sketch. Setting GeometryType automatically initializes the IEngineEditSketch::Geometry property and vice versa. For example, if you set the GeometryType to esriGeometryPolygon, a new empty Polygon object will be created.

Valid esriGeometryType constants used by IEngineEditSketch are: esriGeometryPoint, esriGeometryMultipoint, esriGeometryPolyline, esriGeometryPolygon and esriGeometryNull.

Product Availability

Available with ArcGIS Engine.

Specified by:
getGeometryType in interface IEngineEditSketch
Returns:
A com.esri.arcgis.geometry.esriGeometryType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setGeometryType

public void setGeometryType(int geomType)
                     throws IOException,
                            AutomationException
Type of the geometry stored in the edit sketch.

Product Availability

Available with ArcGIS Engine.

Specified by:
setGeometryType in interface IEngineEditSketch
Parameters:
geomType - A com.esri.arcgis.geometry.esriGeometryType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getGeometry

public IGeometry getGeometry()
                      throws IOException,
                             AutomationException
Geometry stored in the edit sketch.

Description

This property sets the geometry that the EngineEditor works with and ultimately passes it to the current task. By default, the EngineEditor creates a new empty geometry any time an edit session is started, the target layer is changed, the GeometryType is reset, or a task is completed. There is generally no need, therefore, to set the Geometry property when you are building new geometries.

Do set the Geometry property, however, when you want to bring an existing feature into the edit sketch.

Valid esriGeometryType constants used by IEngineEditSketch are: esriGeometryPoint, esriGeometryMultipoint, esriGeometryPolyline, esriGeometryPolygon and esriGeometryNull.

Product Availability

Available with ArcGIS Engine.

Specified by:
getGeometry in interface IEngineEditSketch
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.

setGeometryByRef

public void setGeometryByRef(IGeometry geometry)
                      throws IOException,
                             AutomationException
Geometry stored in the edit sketch.

Product Availability

Available with ArcGIS Engine.

Specified by:
setGeometryByRef in interface IEngineEditSketch
Parameters:
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.

getEditLocation

public IPoint getEditLocation()
                       throws IOException,
                              AutomationException
A point that can be used by any custom editing commands. This property is set by the SetEditLocation method.

Description

This property stores the Point location specified by the IEngineEditSketch::SetEditLocation method. Once a point has been stored in this property it remains there until the EngineEditSketch::SetEditLocation method is called again.
Use this property when creating custom commands that require a specific point location to perform some operation. For example, the OnMouseUp event could call IEngineEditSketch::SetEditLocation to store the point at which the user had clicked on the MapControl into the EditLocation property. This property could then be used by an 'Insert Vertex' command to add a new vertex to a sketch.

Product Availability

Available with ArcGIS Engine.

Specified by:
getEditLocation in interface IEngineEditSketch
Returns:
A reference to a com.esri.arcgis.geometry.IPoint
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPart

public int getPart()
            throws IOException,
                   AutomationException
The index of the current part of the sketch.

Description

This property stores the index of the part of a sketch as specified by the IEngineEditSketch::SetEditLocation method. Once the index has been stored in this property, it remains there until the next time you call the IEngineEditSketch::SetEditLocation method.
Use this property when creating custom commands in a context menu that require the specific sketch part.
The IEngineEditSketch::SetEditLocation could be called during the IMapControlEvents2::OnMouseUp event to store the index of the part of a sketch which the user had clicked on.

Product Availability

Available with ArcGIS Engine.

Specified by:
getPart in interface IEngineEditSketch
Returns:
The part
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSegment

public int getSegment()
               throws IOException,
                      AutomationException
The index of the current segment of the sketch.

Description

This property stores the index of the segment of a sketch as specified by the IEngineEditSketch::SetEditLocation method. Once the index has been stored in this property, it remains there until the next time you call the IEngineEditSketch::SetEditLocation method.
Use this property when creating custom commands in a context menu that require the specific sketch segment.
The IEngineEditSketch::SetEditLocation could be called during the IMapControlEvents2::OnMouseUp event to store the index of the segment which the user had clicked on. A value of -1 indicates that no segment has been identified by the IEngineEditSketch::SetEditLocation.

Product Availability

Available with ArcGIS Engine.

Specified by:
getSegment in interface IEngineEditSketch
Returns:
The segment
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getVertex

public int getVertex()
              throws IOException,
                     AutomationException
The index of the current vertex of the sketch.

Description

This property stores the index of the vertex of a sketch as specified by the IEngineEditSketch::SetEditLocation method. Once the index has been stored in this property, it remains there until the next time you call the IEngineEditSketch::SetEditLocation method.
Use this property when creating custom commands in a context menu that require a specific sketch vertex.
The IEngineEditSketch::SetEditLocation could be called during the IMapControlEvents2::OnMouseUp event to store the index of the vertex which the user had clicked on.

Product Availability

Available with ArcGIS Engine.

Specified by:
getVertex in interface IEngineEditSketch
Returns:
The vertex
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addPoint

public void addPoint(IPoint point,
                     boolean allowUndo)
              throws IOException,
                     AutomationException
Adds a point to the edit sketch. If allowUndo is true, a new operation will be created.

Description

Use the AddPoint method to add a point to the geometry held in the edit sketch. The point parameter specifies the next point in the sketch. In all cases, new segments are added linking the edit sketch to the provided point, except where the geometry type is set to Point or the point represents the very first point in the edit sketch.

Remarks

This method fires the IEngineEditEvents::OnVertexAdded, IEngineEditEvents::OnSketchModified and IEngineEditEvents::OnAfterDrawSketch events.

Product Availability

Available with ArcGIS Engine.

Specified by:
addPoint in interface IEngineEditSketch
Parameters:
point - A reference to a com.esri.arcgis.geometry.IPoint (in)
allowUndo - The allowUndo (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

refreshSketch

public void refreshSketch()
                   throws IOException,
                          AutomationException
Invalidates the portion of the display that is occupied by the sketch.

Description

Call RefreshSketch to invalidate the portion of the display that is occupied by the sketch. Sometimes, however, it may be necessary to invalidate a larger portion of the display in order to get rid of unwanted artifacts. This situation can arise when you shorten the length of a segment since old data may still be erroneously displayed outside of the new sketch geometry.

Remarks

This method fires the IEngineEditEvents::OnAfterDrawSketch event.

Product Availability

Available with ArcGIS Engine.

Specified by:
refreshSketch in interface IEngineEditSketch
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

finishSketch

public void finishSketch()
                  throws IOException,
                         AutomationException
Completes the current edit sketch.

Description

The FinishSketch method finishes the edit sketch and notifies the EngineEditor's current task of this event which executes the IEngineEditTask::OnFinishSketch method. For example, the "Create New Feature" edit task will create a new feature using the IEngineEditSketch::Geometry. A number of events may be fired by the IEngineEditTask::OnFinishSketch method depending on the task being executed.

Product Availability

Available with ArcGIS Engine.

Specified by:
finishSketch in interface IEngineEditSketch
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

finishSketchPart

public void finishSketchPart()
                      throws IOException,
                             AutomationException
Completes a part for the current edit sketch.

Description

The FinishSketchPart method finishes the edit sketch part during the creation of multi-part geometries.

Remarks

This method fires the IEngineEditEvents::OnAfterDrawSketch event.

Product Availability

Available with ArcGIS Engine.

Specified by:
finishSketchPart in interface IEngineEditSketch
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLastPoint

public IPoint getLastPoint()
                    throws IOException,
                           AutomationException
The last point in the edit sketch.

Description

Use this property to retrieve the last point in the edit sketch.

Product Availability

Available with ArcGIS Engine.

Specified by:
getLastPoint in interface IEngineEditSketch
Returns:
A reference to a com.esri.arcgis.geometry.IPoint
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

modifySketch

public void modifySketch()
                  throws IOException,
                         AutomationException
Notifies listeners that the sketch has been changed.

Description

Call ModifySketch if you are programmatically modifying an edit sketch. The ModifySketch method will programmatically fire the IEngineEditEvents::OnModifiedSketch event, thus ensuring that all listening clients are notified.

Product Availability

Available with ArcGIS Engine.

Specified by:
modifySketch in interface IEngineEditSketch
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

vertexAdded

public void vertexAdded(IPoint point)
                 throws IOException,
                        AutomationException
Notifies listeners that a vertex has been added to the sketch.

Description

Call VertexAdded if you are programmatically adding a vertex to an edit sketch. The VertexAdded method will programmatically fire the IEngineEditEvents::OnVertexAdded event, thus ensuring that all listening clients are notified.

Product Availability

Available with ArcGIS Engine.

Specified by:
vertexAdded in interface IEngineEditSketch
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.

vertexDeleted

public void vertexDeleted(IPoint point)
                   throws IOException,
                          AutomationException
Notifies listeners that a vertex has been deleted from the sketch.

Description

Call VertexDeleted if you are programmatically deleting a vertex from an edit sketch. The VertexDeleted method will programmatically fire the IEngineEditEvents::OnVertexDeleted event, thus ensuring that all listening clients are notified.

Product Availability

Available with ArcGIS Engine.

Specified by:
vertexDeleted in interface IEngineEditSketch
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.

vertexMoved

public void vertexMoved(IPoint point)
                 throws IOException,
                        AutomationException
Notifies listeners that a vertex has been moved in the sketch.

Description

Call VertexMoved if you are programmatically moving a vertex in an edit sketch. The VertexMoved method will programmatically fire the IEngineEditEvents::OnVertexMoved event, thus ensuring that all listening clients are notified.

Product Availability

Available with ArcGIS Engine.

Specified by:
vertexMoved in interface IEngineEditSketch
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.

setEditLocation

public void setEditLocation(int x,
                            int y)
                     throws IOException,
                            AutomationException
Sets the part, segment and vertex of the edit sketch at the x,y location.

Description

Call the SetEditLocation method to store the EditLocation, Vertex, Segment and/or Part of an edit sketch.

It is essential that this method is called prior to executing any of the following commands; ControlsEditingVertexInsertCommand, ControlsEditingVertexDeleteCommand, ControlsEditingVertexMoveCommand and ControlsEditingVertexMoveToCommand or popping up the ControlsEditingVertexContextMenu.

Product Availability

Available with ArcGIS Engine.

Specified by:
setEditLocation in interface IEngineEditSketch
Parameters:
x - The x (in)
y - The y (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isZAware

public boolean isZAware()
                 throws IOException,
                        AutomationException
Indicates whether the edit sketch geometry can contain Zs.

Description

If the IEngineEditSketch::Geometry contains elevation (z) values, this property will return a boolean value of True.

To view the z values for the edit sketch display the edit sketch properties dialog using the ControlsEditingSketchPropertiesCommand and select the sketch. If the sketch is ZAware, an additional column will appear next to the y column showing the z values.

Product Availability

Available with ArcGIS Engine.

Specified by:
isZAware in interface IEngineEditSketch
Returns:
The aware
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setZAware

public void setZAware(boolean aware)
               throws IOException,
                      AutomationException
Indicates whether the edit sketch geometry can contain Zs.

Product Availability

Available with ArcGIS Engine.

Specified by:
setZAware in interface IEngineEditSketch
Parameters:
aware - The aware (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCurrentZ

public double getCurrentZ()
                   throws IOException,
                          AutomationException
Current Z value for the edit sketch.

Description

The CurrentZ property returns or sets the Z value that is applied to all new vertices added to the sketch. This is not applied to moved or changed vertices.
Use the CurrentZ property when estimating height in fixed bands. For example, if you are capturing data at 0, 2 or 4 metres above ground or sea level.

Remarks

To view the z values for the edit sketch display the edit sketch properties dialog using the ControlsEditingSketchPropertiesCommand and select the sketch. If the sketch is ZAware, an additional column will appear next to the y column showing the z values.

Product Availability

Available with ArcGIS Engine.

Specified by:
getCurrentZ in interface IEngineEditSketch
Returns:
The z
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCurrentZ

public void setCurrentZ(double z)
                 throws IOException,
                        AutomationException
Current Z value for the edit sketch.

Description

The CurrentZ property returns or sets the Z value that is applied to all new vertices added to the sketch. This is not applied to moved or changed vertices.
Use the CurrentZ property when estimating height in fixed bands. For example, if you are capturing data at 0, 2 or 4 metres above ground or sea level.

Product Availability

Available with ArcGIS Engine.

Specified by:
setCurrentZ in interface IEngineEditSketch
Parameters:
z - The z (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

snapPoint

public boolean snapPoint(IPoint point)
                  throws IOException,
                         AutomationException
Attempts to snap the point using the current snap environment.

Description

SnapPoint passes the required point parameter to each of the added snap agents in the order that these agents were added. The agents attempt, in turn, to find point coordinates that fulfill its snap properties for the incoming point. If a new snap location is found, the relevant snap agent modifies the original point's coordinates to that of the new location. The same point is then returned to SnapPoint. Once a snap agent is found that satisfies the point subsequent snap agents are not tested.

As an example: there may be several feature snap agents present. Each receives a point from the current cursor location, which is passed to the agent via the SnapPoint method. If the conditions for a snap are met, the boolean value of the agent returns TRUE, the point's coordinates are updated based on the active feature snap conditions and the same point is returned to SnapPoint.

Product Availability

Available with ArcGIS Engine.

Specified by:
snapPoint in interface IEngineSnapEnvironment
Parameters:
point - A reference to a com.esri.arcgis.geometry.IPoint (in)
Returns:
The snapped
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSnapToleranceUnits

public int getSnapToleranceUnits()
                          throws IOException,
                                 AutomationException
The units used for the snap tolerance.

Description

SnapToleranceUnits defines the units used to define the radius used by active snap agents. By default The default SnapToleranceUnits is esriSnapTolerancePixels.

Product Availability

Available with ArcGIS Engine.

Specified by:
getSnapToleranceUnits in interface IEngineSnapEnvironment
Returns:
A com.esri.arcgis.controls.esriEngineSnapToleranceUnits constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSnapToleranceUnits

public void setSnapToleranceUnits(int units)
                           throws IOException,
                                  AutomationException
The units used for the snap tolerance.

Product Availability

Available with ArcGIS Engine.

Specified by:
setSnapToleranceUnits in interface IEngineSnapEnvironment
Parameters:
units - A com.esri.arcgis.controls.esriEngineSnapToleranceUnits constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSnapTolerance

public double getSnapTolerance()
                        throws IOException,
                               AutomationException
The snap tolerance, measured in pixels or map units.

Description

SnapTolerance determines the size of the region bounding the input point location. It is given as a radius, measured in pixels, and the search for a potential snap point candidate is made within this region. By default SnapTolerance is 7.

Product Availability

Available with ArcGIS Engine.

Specified by:
getSnapTolerance in interface IEngineSnapEnvironment
Returns:
The tol
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSnapTolerance

public void setSnapTolerance(double tol)
                      throws IOException,
                             AutomationException
The snap tolerance, measured in pixels or map units.

Product Availability

Available with ArcGIS Engine.

Specified by:
setSnapTolerance in interface IEngineSnapEnvironment
Parameters:
tol - The tol (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSnapAgentCount

public int getSnapAgentCount()
                      throws IOException,
                             AutomationException
The number of active snap agents.

Description

SnapAgentCount returns the number of currently active snap agents.

Product Availability

Available with ArcGIS Engine.

Specified by:
getSnapAgentCount in interface IEngineSnapEnvironment
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSnapAgent

public IEngineSnapAgent getSnapAgent(int index)
                              throws IOException,
                                     AutomationException
A snap agent at the given index.

Product Availability

Available with ArcGIS Engine.

Specified by:
getSnapAgent in interface IEngineSnapEnvironment
Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.controls.IEngineSnapAgent
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

clearSnapAgents

public void clearSnapAgents()
                     throws IOException,
                            AutomationException
Removes all snap agents.

Description

ClearSnapAgents removes all feature snap agents, but not snap agents such as edit sketch vertices.

Product Availability

Available with ArcGIS Engine.

Specified by:
clearSnapAgents in interface IEngineSnapEnvironment
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

removeSnapAgent

public void removeSnapAgent(int index)
                     throws IOException,
                            AutomationException
Removes the snap agent at the given index.

Description

RemoveSnapAgent removes the feature snap agent at the specified index; this does not apply to non-feature snap agents such as edit sketch vertices.

Product Availability

Available with ArcGIS Engine.

Specified by:
removeSnapAgent in interface IEngineSnapEnvironment
Parameters:
index - The index (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addSnapAgent

public void addSnapAgent(IEngineSnapAgent snapAgent)
                  throws IOException,
                         AutomationException
Adds a new snap agent to the snap environment.

Description

AddSnapAgent activates and adds to the snap environment any valid snap agent. Snap agents which have already been added are not changed by this method. Snap agents are identified by their SnapAgent.Name and GUID.

Product Availability

Available with ArcGIS Engine.

Specified by:
addSnapAgent in interface IEngineSnapEnvironment
Parameters:
snapAgent - A reference to a com.esri.arcgis.controls.IEngineSnapAgent (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getReportPrecision

public int getReportPrecision()
                       throws IOException,
                              AutomationException
Controls the number of decimal places the editor reports numbers with.

Description

Use ReportPrecision to control the number of decimal places reported back from editing functions. By default ReportPrecision is set to 3.

Product Availability

Available with ArcGIS Engine.

Specified by:
getReportPrecision in interface IEngineEditProperties
Returns:
The numDecs
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setReportPrecision

public void setReportPrecision(int numDecs)
                        throws IOException,
                               AutomationException
Controls the number of decimal places the editor reports numbers with.

Product Availability

Available with ArcGIS Engine.

Specified by:
setReportPrecision in interface IEngineEditProperties
Parameters:
numDecs - The numDecs (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getStreamTolerance

public double getStreamTolerance()
                          throws IOException,
                                 AutomationException
Controls the streaming tolerance, measured in map units.

Description

Use StreamTolerance to set the number of points that get added to a map (in map units) by the ControlsEditingSketchTool when in stream mode. By default StreamTolerance is 0.

Use the ControlsEditingSketchStreamingCommand to set the ControlsEditingSketchTool in stream mode.

Product Availability

Available with ArcGIS Engine.

Specified by:
getStreamTolerance in interface IEngineEditProperties
Returns:
The tol
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setStreamTolerance

public void setStreamTolerance(double tol)
                        throws IOException,
                               AutomationException
Controls the streaming tolerance, measured in map units.

Product Availability

Available with ArcGIS Engine.

Specified by:
setStreamTolerance in interface IEngineEditProperties
Parameters:
tol - The tol (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getStreamGroupingCount

public int getStreamGroupingCount()
                           throws IOException,
                                  AutomationException
Controls the number of points to group together when streaming.

Description

The StreamGroupingCount property controls how many grouped points are added to the undo stack by the ControlsEditingSketchTool when in stream mode. By default StreamGroupingCount is 50.

If StreamGroupingCount is 1 each streamed point added will be undoable and redoable. If the streaming tolerance is low, however, you may wish to make the grouping larger so that groups of added points can be undone or redone by the user with only one undo or redo.

Use the ControlsEditingSketchStreamingCommand to set the ControlsEditingSketchTool in stream mode.

Product Availability

Available with ArcGIS Engine.

Specified by:
getStreamGroupingCount in interface IEngineEditProperties
Returns:
The tol
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setStreamGroupingCount

public void setStreamGroupingCount(int tol)
                            throws IOException,
                                   AutomationException
Controls the number of points to group together when streaming.

Product Availability

Available with ArcGIS Engine.

Specified by:
setStreamGroupingCount in interface IEngineEditProperties
Parameters:
tol - The tol (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isStretchGeometry

public boolean isStretchGeometry()
                          throws IOException,
                                 AutomationException
Indicates if the edit sketch is stretched when one of its vertices is moved.

Description

StretchGeometry determines whether or not the edit sketch is stretched proportionally when a vertex is moved. By default StretchGeometryis false.

The following diagrams illustrate this point better. In both cases, the upper right vertex was moved.

Moving a vertex with StretchGeometry set to True:

Moving a vertex with StretchGeometry set to False:

Product Availability

Available with ArcGIS Engine.

Specified by:
isStretchGeometry in interface IEngineEditProperties
Returns:
The stretch
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setStretchGeometry

public void setStretchGeometry(boolean stretch)
                        throws IOException,
                               AutomationException
Indicates if the edit sketch is stretched when one of its vertices is moved.

Product Availability

Available with ArcGIS Engine.

Specified by:
setStretchGeometry in interface IEngineEditProperties
Parameters:
stretch - The stretch (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSketchSymbol

public ILineSymbol getSketchSymbol()
                            throws IOException,
                                   AutomationException
Symbol used to draw the lines of the edit sketch.

Description

The SketchSymbol used for lines segments in the edit sketch. The default line symbol is a solid green line with a width of one.

Product Availability

Available with ArcGIS Engine.

Specified by:
getSketchSymbol in interface IEngineEditProperties
Returns:
A reference to a com.esri.arcgis.display.ILineSymbol
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSketchSymbolByRef

public void setSketchSymbolByRef(ILineSymbol symbol)
                          throws IOException,
                                 AutomationException
Symbol used to draw the lines of the edit sketch.

Product Availability

Available with ArcGIS Engine.

Specified by:
setSketchSymbolByRef in interface IEngineEditProperties
Parameters:
symbol - A reference to a com.esri.arcgis.display.ILineSymbol (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSketchVertexSymbol

public IMarkerSymbol getSketchVertexSymbol()
                                    throws IOException,
                                           AutomationException
Symbol used to draw the vertices of the edit sketch.

Description

The SketchVertexSymbol used for vertices in the edit sketch. Edit sketch vertices are drawn in green by default.

Product Availability

Available with ArcGIS Engine.

Specified by:
getSketchVertexSymbol in interface IEngineEditProperties
Returns:
A reference to a com.esri.arcgis.display.IMarkerSymbol
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSketchVertexSymbolByRef

public void setSketchVertexSymbolByRef(IMarkerSymbol symbol)
                                throws IOException,
                                       AutomationException
Symbol used to draw the vertices of the edit sketch.

Product Availability

Available with ArcGIS Engine.

Specified by:
setSketchVertexSymbolByRef in interface IEngineEditProperties
Parameters:
symbol - A reference to a com.esri.arcgis.display.IMarkerSymbol (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSelectedVertexSymbol

public IMarkerSymbol getSelectedVertexSymbol()
                                      throws IOException,
                                             AutomationException
Symbol used to draw the active vertex of the edit sketch.

Description

The SelectedVertexSymbol used for the last point (active point) in the edit sketch. By default this point is drawn in red and has a size of 4.

Product Availability

Available with ArcGIS Engine.

Specified by:
getSelectedVertexSymbol in interface IEngineEditProperties
Returns:
A reference to a com.esri.arcgis.display.IMarkerSymbol
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSelectedVertexSymbolByRef

public void setSelectedVertexSymbolByRef(IMarkerSymbol symbol)
                                  throws IOException,
                                         AutomationException
Symbol used to draw the active vertex of the edit sketch.

Product Availability

Available with ArcGIS Engine.

Specified by:
setSelectedVertexSymbolByRef in interface IEngineEditProperties
Parameters:
symbol - A reference to a com.esri.arcgis.display.IMarkerSymbol (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSnapSymbol

public IMarkerSymbol getSnapSymbol()
                            throws IOException,
                                   AutomationException
Symbol used to draw the snap location.

Description

The SnapSymbol displayed whenever you are working with the edit sketch. The default snap symbol is a blue dot.

The snap agent knows to draw the snap symbol twice, once to get rid of the old symbol and once to draw the symbol at its new location. When setting the symbol, don't forget to set the ISymbol::ROP2 to esriROPNotXOrPen. This setting allows the symbol to erase itself when drawn twice in the same location.

Product Availability

Available with ArcGIS Engine.

Specified by:
getSnapSymbol in interface IEngineEditProperties
Returns:
A reference to a com.esri.arcgis.display.IMarkerSymbol
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSnapSymbolByRef

public void setSnapSymbolByRef(IMarkerSymbol symbol)
                        throws IOException,
                               AutomationException
Symbol used to draw the snap location.

Product Availability

Available with ArcGIS Engine.

Specified by:
setSnapSymbolByRef in interface IEngineEditProperties
Parameters:
symbol - A reference to a com.esri.arcgis.display.IMarkerSymbol (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isAutoSaveOnVersionRedefined

public boolean isAutoSaveOnVersionRedefined()
                                     throws IOException,
                                            AutomationException
Indicates whether the stop editing process should automatically reconcile an edit session and save the version without notification.

Description

Auto reconciliation provides the user the ability to delay the save process for after the reconciliation. This allows the user to inspect the results of the reconciliation prior to saving. By default AutoSaveOnVersionRedefined is false.

If AutoSaveOnVersionRedefined is true, auto reconciliation will automatically reconcile the edit session with the version's current database state and save, making changes available to others using the database.

If AutoSaveOnVersionRedefined is false, when a save occurs, the edit session will be reconciled with the version's current database state, and then a message will inform the user that the edit session has been reconciled but has not been saved.

Product Availability

Available with ArcGIS Engine.

Specified by:
isAutoSaveOnVersionRedefined in interface IEngineEditProperties
Returns:
The stretch
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAutoSaveOnVersionRedefined

public void setAutoSaveOnVersionRedefined(boolean stretch)
                                   throws IOException,
                                          AutomationException
Indicates whether the stop editing process should automatically reconcile an edit session and save the version without notification.

Product Availability

Available with ArcGIS Engine.

Specified by:
setAutoSaveOnVersionRedefined in interface IEngineEditProperties
Parameters:
stretch - The stretch (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTargetLayer

public ILayer getTargetLayer()
                      throws IOException,
                             AutomationException
The editor's target layer.

Description

The target layer (or current layer) to be editied. For example, if the target layer is set to 'Buildings' any new features created will be part of the 'Buildings' layer.

The TargetLayer gets set when the end user interactively selects a layer using the ControlsEditingTargetToolControl.

Product Availability

Available with ArcGIS Engine.

Specified by:
getTargetLayer in interface IEngineEditProperties
Returns:
A reference to a com.esri.arcgis.carto.ILayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getStickyMoveTolerance

public int getStickyMoveTolerance()
                           throws IOException,
                                  AutomationException
Controls the sticky move tolerance.

Description

StickyMoveTolerance determines the minimum distance (measured in pixels) the cursor must move before the edit is completed. This can be helpful in preventing small inadvertent shifts of features when editing. By default StickyMoveTolerance is 0.

Product Availability

Available with ArcGIS Engine.

Specified by:
getStickyMoveTolerance in interface IEngineEditProperties2
Returns:
The tol
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setStickyMoveTolerance

public void setStickyMoveTolerance(int tol)
                            throws IOException,
                                   AutomationException
Controls the sticky move tolerance.

Product Availability

Available with ArcGIS Engine.

Specified by:
setStickyMoveTolerance in interface IEngineEditProperties2
Parameters:
tol - The tol (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isSnapTips

public boolean isSnapTips()
                   throws IOException,
                          AutomationException
Indicates whether to show the snap tips.

Description

Use SnapTips to determine whether snap tips are displayed when using the snapping envionrment. By default SnapTips is false.

Snap tips provide feedback in the form of a tool tip and a message in the status bar identifying the snap agent that was used to modify the current point. If the snap agent used is a feature snap agent, the layer name and hit type are displayed; otherwise the snap agent name is displayed.

Product Availability

Available with ArcGIS Engine.

Specified by:
isSnapTips in interface IEngineEditProperties2
Returns:
The tips
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSnapTips

public void setSnapTips(boolean tips)
                 throws IOException,
                        AutomationException
Indicates whether to show the snap tips.

Product Availability

Available with ArcGIS Engine.

Specified by:
setSnapTips in interface IEngineEditProperties2
Parameters:
tips - The tips (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAngularUnitPrecision

public void setAngularUnitPrecision(int auPrecision)
                             throws IOException,
                                    AutomationException
Precision used to display angular units.

Product Availability

Available with ArcGIS Engine.

Specified by:
setAngularUnitPrecision in interface IEngineEditProperties2
Parameters:
auPrecision - The auPrecision (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAngularUnitPrecision

public int getAngularUnitPrecision()
                            throws IOException,
                                   AutomationException
Precision used to display angular units.

Description

AngularUnitPrecision determines the number of digits displayed after the decimal place. By default AngularUnitPrecision is 4.

Product Availability

Available with ArcGIS Engine.

Specified by:
getAngularUnitPrecision in interface IEngineEditProperties2
Returns:
The auPrecision
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDirectionType

public void setDirectionType(int dirType)
                      throws IOException,
                             AutomationException
Direction Type.

Product Availability

Available with ArcGIS Engine.

Specified by:
setDirectionType in interface IEngineEditProperties2
Parameters:
dirType - A com.esri.arcgis.controls.esriEngineDirectionType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDirectionType

public int getDirectionType()
                     throws IOException,
                            AutomationException
Direction Type.

Description

DirectionType determines the method of measurement for direction values. By default DirectionType is esriDTPolar.

Product Availability

Available with ArcGIS Engine.

Specified by:
getDirectionType in interface IEngineEditProperties2
Returns:
A com.esri.arcgis.controls.esriEngineDirectionType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDirectionUnits

public void setDirectionUnits(int dirUnits)
                       throws IOException,
                              AutomationException
Direction Units.

Product Availability

Available with ArcGIS Engine.

Specified by:
setDirectionUnits in interface IEngineEditProperties2
Parameters:
dirUnits - A com.esri.arcgis.controls.esriEngineDirectionUnits constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDirectionUnits

public int getDirectionUnits()
                      throws IOException,
                             AutomationException
Direction Units.

Description

DirectionUnits defines how angles are specified; how many parts a complete circle is divided into; and how to interpret the angle value. By default DirectionUnits is esriDUDecimalDegrees.

Product Availability

Available with ArcGIS Engine.

Specified by:
getDirectionUnits in interface IEngineEditProperties2
Returns:
A com.esri.arcgis.controls.esriEngineDirectionUnits constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDistanceCorrectionFactor

public void setDistanceCorrectionFactor(double distFactor)
                                 throws IOException,
                                        AutomationException
Distance Correction Factor.

Product Availability

Available with ArcGIS Engine.

Specified by:
setDistanceCorrectionFactor in interface IEngineEditProperties2
Parameters:
distFactor - The distFactor (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDistanceCorrectionFactor

public double getDistanceCorrectionFactor()
                                   throws IOException,
                                          AutomationException
Distance Correction Factor.

Description

DistanceCorrectionFactor determines the distance amount applied when length measurements are input into the editor. The value may be accessed or modified at any time; however, it is applied only when UseGroundToGrid is set to true. By default DistanceCorrectionFactor is 1.

Product Availability

Available with ArcGIS Engine.

Specified by:
getDistanceCorrectionFactor in interface IEngineEditProperties2
Returns:
The distFactor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAngularCorrectionOffset

public void setAngularCorrectionOffset(double angOffset)
                                throws IOException,
                                       AutomationException
Angular Correction Offset.

Product Availability

Available with ArcGIS Engine.

Specified by:
setAngularCorrectionOffset in interface IEngineEditProperties2
Parameters:
angOffset - The angOffset (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAngularCorrectionOffset

public double getAngularCorrectionOffset()
                                  throws IOException,
                                         AutomationException
Angular Correction Offset.

Description

AngularCorrectionOffset determines the amount of correction applied to each entered angular value. The offset is specified in radians. This property may be accessed at any time; it is only applied when the UseGroundToGrid is set to true. By default AngularCorrectionOffset is 0 (no correction).

Product Availability

Available with ArcGIS Engine.

Specified by:
getAngularCorrectionOffset in interface IEngineEditProperties2
Returns:
The angOffset
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setUseGroundToGrid

public void setUseGroundToGrid(boolean g2g)
                        throws IOException,
                               AutomationException
Indicates whether to use Ground to Grid.

Product Availability

Available with ArcGIS Engine.

Specified by:
setUseGroundToGrid in interface IEngineEditProperties2
Parameters:
g2g - The g2g (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isUseGroundToGrid

public boolean isUseGroundToGrid()
                          throws IOException,
                                 AutomationException
Indicates whether to use Ground to Grid.

Description

UseGroundToGrid determines whether any distance or direction offsets are applied to angle or length values respectively when using the editor. By default UseGroundToGrid is false.

If UseGroundToGrid is true then the distance offset specified by DistanceCorrectionFactor and the angular offset specified by AngularCorrectionOffset are used.

Product Availability

Available with ArcGIS Engine.

Specified by:
isUseGroundToGrid in interface IEngineEditProperties2
Returns:
The g2g
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTargetLayer

public void setTargetLayer(IFeatureLayer layer,
                           int subType)
                    throws IOException,
                           AutomationException
Sets the EngineEditor's target layer and subtype for new features.

Description

Use this method to set the EngineEditor's target layer. The target layer is the layer that new features are typically written to by commands or edit tasks. For example, the "Create New Feature" task creates new features and stores them in the target layer.

If the ControlsEditingTargetToolControl is present it automatically sets the target layer to be the first editable layer in the map when editing starts and it's layer list will be updated when this method is called.

This method should only be called for those layers where IEngineEditLayers::IsEditable returns a True value. To programmatically edit features in an editable layer you do not have to call the SetTargetLayer method.

Remarks

This method fires IEngineEditEvents::OnTargetLayerChanged and IEngineEditEvents::OnSketchModified.

Product Availability

Available with ArcGIS Engine.

Specified by:
setTargetLayer in interface IEngineEditLayers
Parameters:
layer - A reference to a com.esri.arcgis.carto.IFeatureLayer (in)
subType - The subType (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

IEngineEditLayers_getTargetLayer

public IFeatureLayer IEngineEditLayers_getTargetLayer()
                                               throws IOException,
                                                      AutomationException
The EngineEditor's target layer that new features are added to.

Product Availability

Available with ArcGIS Engine.

Specified by:
IEngineEditLayers_getTargetLayer in interface IEngineEditLayers
Returns:
A reference to a com.esri.arcgis.carto.IFeatureLayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCurrentSubtype

public int getCurrentSubtype()
                      throws IOException,
                             AutomationException
The sub type for new features in the CurrentLayer.

Description

Returns the subtype code for the target layer. If the IEngineEditLayers::TargetLayer does not have any subtypes then 0 is returned.

Product Availability

Available with ArcGIS Engine.

Specified by:
getCurrentSubtype in interface IEngineEditLayers
Returns:
The typeCode
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isEditable

public boolean isEditable(IFeatureLayer layer)
                   throws IOException,
                          AutomationException
Indicates if the specific feature layer is editable.

Description

Use the IsEditable method to check if a particular layer is editable.

When an edit session is started this method is automatically called for each layer in the Map. Only editable layers are added to the ControlsEditingTargetToolControl.

Product Availability

Available with ArcGIS Engine.

Specified by:
isEditable in interface IEngineEditLayers
Parameters:
layer - A reference to a com.esri.arcgis.carto.IFeatureLayer (in)
Returns:
The pEditable
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws IOException,
                                       AutomationException
interfaceSupportsErrorInfo

Description

Indicates whether the interface supports IErrorInfo.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getName

public String getName()
               throws IOException,
                      AutomationException
The name of the extension.

Specified by:
getName in interface IExtension
Returns:
The extensionName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

startup

public void startup(Object initializationData)
             throws IOException,
                    AutomationException
Starts up the extension with the given initialization data.

Specified by:
startup in interface IExtension
Parameters:
initializationData - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

shutdown

public void shutdown()
              throws IOException,
                     AutomationException
Shuts down the extension.

Specified by:
shutdown in interface IExtension
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.