Jumper Extension

Created:12/17/2000
Description:

This sample code is designed to add a jumper (semi-circle) during the adding of line feature that crosses another line feature of the same feature class. For instance, if you are adding a new pipe feature and you cross over an existing pipe feature, this extension will automatically add a jumper.

The extension is designed as an MxExtension so the state of the extension can be toggled on and off through the ArcMap extension dialog. This is accomplished by implementing IExtensionConfig in addition to IExtension.

The extension is currently searching for a layer called "Pipes". Update the code and recompile if you want to apply this to a layer with a different name.


How to use:
  1. (Optional) Change the layer to search for from "Pipes" to something else and recompile.
  2. Register the dll on your machine.
  3. Use Categories to add clsJump to the 'ESRI Mx Extensions' component category.
  4. Start ArcMap and add a line layer with the name "Pipes" (or whatever name you used).
  5. Access the Extensions dialog and make sure the Jumper extension is enabled.
  6. Start editing, and add line features into the "Pipes" layer that cross other features in that layer.
  7. If you use the Extension dialog in ArcMap to turn off the extension, you must also change the target layer for the change to take effect.

Application:
ArcMap

Requires: Line feature class

Difficulty: Moderate


Visual Basic
File Description
Jumper.cls Class file containing jumper extension code.


Key CoClasses: Editor, PolyLine
Key Interfaces: ICurve, IEditSketch, ISegmentCollection, ITopologicalOperator
Key Members: ICurve::ConstructChordDistance, IEditSketch::Geometry, IEditSketch::RefreshSketch, ISegmentCollection::AddSegment, ITopologicalOperator::Intersect