Zipper Task

Created:9/20/2002
Description:

This sample allows features within a user specified tolerance to be snapped to the edit sketch. Using the sketch tool a polyline sketch is created. When the sketch is finished, a dialog appears asking for a tolerance and the layers to be adjusted. Features from the specified layers that fall within the tolerance are then aligned to the geometry of the sketch.

A common scenario for using this tool is when you have one feature that you want to align the features from other feature classes to. The Trace tool (or the Replace Sketch context menu choice) is used to create a sketch of the geometry in the feature, and the Zipper Task will then use this geometry to align the other features.

When you have a sketch that loops back on itself, the task may not work as you expect. In these cases, it is best to run the task twice. The first time for the first half of the loop, and the second time for the rest.


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 and select the Zipper Task as the current task.
  4. Create a sketch and finish it.
  5. Select the layers whose features you want to adjust, specify a search tolerance, then click on the OK button.

Application:
ArcMap

Requires: An edit session.

Minimum ArcGIS Version Required: 8.3

Difficulty: Advanced


Visual Basic
File Description
frmZipperInput.frm Form for specifying the layers to search and the tolerance.
ZipperTask.cls Class implementing the edit task.
ZipperTaskPrj.vbp The project file for the custom edit task.


Key CoClasses: Editor, Feature, Polyline, Polygon, Ring
Key Interfaces: IEditSketch, IFeature, IPointCollection, IProximityOperator, IRelationalOperator, IRing, ISegmentCollection
Key Members: IEditSketch::Geometry, IFeature::Shape, IPointCollection::Point, IProximityOperator::ReturnDistance, IRelationalOperator::Equals, IRing::Close, ISegmentCollection::AddSegmentCollection