Feature editing with the control commands


Purpose
This sample demonstrates feature editing using the control commands in conjunction with the ToolbarControl and MapControl.
The AddItem method is used within the Form_Load event to add new feature editing commands to the ToolbarControl with their Style set. A Sketch menu and Vertex menu are added to ToolbarMenu's using the AddItem method. Within the MapControl's OnMouseDown event, the PopupMenu method is used to display the appropriate ToolbarMenu when the right mouse button has been clicked.
The editing properties used by the feature editing commands in the ToolbarControl and the ToolbarMenu are determined by the IEditProperties and IEditProperties2 interface members implemented by the EngineEditor object. The EditProperties and EditProperties2 forms are used to manage and validate changes to these properties by the end user.
Note: If you are editing features from a shapefile or a personal geodatabase, the minimum license required to initialize this application is an ArcGIS Engine or ArcGIS for Desktop Basic license. If you are editing features from an enterprise geodatabase, the minimum license required to initialize this application is an ArcGIS Engine Enterprise GeoDatabase or ArcGIS for Desktop Standard license. Before running this application, check the product licenses in the LicenseControl property pages accordingly.

How to use

See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Browse to a map document to load into the MapControl.
  2. Use the commands on the ToolbarControl to sketch new features, update existing features, update parts of a sketch, or update attributes.
  3. Right-click the MapControl to access the Sketch context menu.
  4. Click the Option buttons to change the edit properties.

AssemblyInfo.cs Assembly information.
FeatureEditing.cs Form file.
EditProperties.cs Class file.
EditProperties2.cs Class file.
Download the C# files
AssemblyInfo.vb Assembly information.
FeatureEditing.vb Form file.
EditProperties.vb Class file.
EditProperties2.vb Class file.
Download the VB.NET files

Download the files for all languages

See Also:

EngineEditor class
IEngineEditProperties interface
IEngineEditProperties2 interface




Development licensing Deployment licensing
Engine Developer Kit Engine
ArcGIS for Desktop Basic
ArcGIS for Desktop Standard
ArcGIS for Desktop Advanced