Editor Commands

Created:1/10/2002
Description:

This sample provides a set of sample commands and tools related to Editing that can either be used in conjunction with the MapControl and PageLayoutControl, or can be used to customize ArcMap.

The sample assumes previous experience in creating custom Tools and Commands.

Start/StopEditing, Abandon/SaveEdits commands
The IWorkspaceEdit::StartEditing/StopEditing methods are used on those datasets being editing in the FocusMap.
Sketch tool
Depending on the type of data layer being edited, INewMultiPointFeedback, INewLineFeedback or INewPolygonFeedback objects are used within the OnMouseDown, OnMouseMove and OnDoubleClick events to track a new shape. This shape is set as the geometry of a new feature created with the IFeatureClass::CreateFeature method.
Edit tool
An IMoveGeometryFeedback object is used within the OnMouseDown, OnMouseMove and OnMouseUp events to move the selected feature of the data layer being editied.


How to use:
  1. Register the Editor.dll
  2. Either add the Commands to the ArcMap interface with the Customize dialog.
  3. Or to use the Commands with the MapControl or PageLayoutControl add a reference to the 'ESRI Sample Editor Commands' and use the following code.
    Dim pCommand As ICommand
    Set pCommand = New ESRI_Editor.StopEditing
    pCommand.OnCreate MapControl1.Object
    

Application:
ArcMap, MapControl, PageLayoutControl

Minimum ArcGIS Version Required: 8.2

Difficulty: Advanced


Visual Basic
File Description
Editor.dll Application extentsion.
clsHook.cls VB Class Module to determine the application.
Editor.res Resource file containing custom bitmaps and cursors.
clsAbandonEdits.cls VB Class Module for the AbandonEdits sample command.
clsEdit.cls VB Class Module for the Edit sample command.
clsSaveEdits.cls VB Class Module for the SaveEdits sample command.
clsSketch.cls VB Class Module for the Sketch sample command.
clsStartEdit.cls VB Class Module for the StartEdit sample command.
clsStopEditing.cls VB Class Module for the StopEditing sample command.
frmCurrentClass.frm VB Form File.
ErrorHandling.bas VB Module for error handling.
Utilities.bas VB Module containing common functions.
Editor.vbp VB Project file.