Cut Polygons Without Selection Task


This sample duplicates the 'Cut Polygon Features' task but instead of using selected polygons, it determines which polygon features to cut from the target layer. This task makes it easier to cut many features in the target layer. Since this task works independently from the selection, the Trace tool can be used with it. The illustration below shows an edit sketch being drawn over a single feature. Finishing the sketch creates new features in the target layer by cutting them with the current edit sketch.

Holes inside polygons can be created by simply creating a self intersecting sketch.

How to use:
  1. Register the dll on your machine.
  2. Use Categories to add the dll to the 'ESRI Edit Tasks' component category.
  3. Start an edit session: the new task should appear in the edit task drop down.
  4. Select the 'Cut Polygons Without Selection' task.
  5. Set the target layer to a polygon layer.
  6. Create an edit sketch over the polygon features that are being cut.


Requires: An edit session.

Difficulty: Beginner

Visual Basic
File Description
CutWithoutSelection.cls VB class file containing the IEditTask implementation.
CutPolygonsTask.vbp The project file for the custom edit task.
CutPolygonsTask.dll The compiled project.

Key CoClasses: Editor
Key Interfaces: IEditTask, IEditSketch, ITopologicalOperator, IFeatureEdit, ISelectionSet
Key Members: ITopologicalOperator::Simplify, IEditSketch::Geometry, IFeatureEdit::Split