Loop Construct



Description:

This code is a specialized sample for adding a loop around a damaged line facility (a pipe for instance). Using an offset distance specified by the user, the code allows for the entry of a loop (with 90 degree angles) with 2 button clicks. After snapping the first point to the line feature, the tool will rubberband a loop (instead of the normal straight line from the sketch tool) while snapping the second point. After snapping the second point, the tool will add the loop and either remove the original line within the loop (the broken pipe), or leave the original and trim 10% off each end (decommission the pipe). The tool is designed to work on complex edge features or simple line features, it can not be used to enter simple edge features.
Products:
ArcView: VB6

Platforms: Windows

Requires: An Edit Session and editable complex edge or simple line layers

Minimum ArcGIS Release: 9.0

How to use:
  1. Start ArcMap, add a complex edge or simple line layer to the map
  2. Browse and select the LoopConstruct.dll using the 'Add From File' button on the customization dialog.
  3. From the 'Developer Samples' commands category, add the 'Loop Construction Entry' command to an existing toolbar.
  4. Begin editing and set the target layer to the complex edge or simple line layer.
  5. Set your snapping environment to snap to the edge of your target layer.
  6. Select the tool, choose one of the two options, and specify an offset distance.
  7. Begin using the tool by snapping the first point along one of the features from the target layer.
  8. Snap the second point along the same feature.

Download the VB6 files
frmResources.frm Form containing icon for the tool.
frmOffset.frm Form containing option choices for using the tool.
LoopConstruct.cls Class containing code for executing the tool.

Download the files for all languages



Key CoClasses:Editor, Feature, Polyline
Key Interfaces: IEditSketch, IFeature, IPolyLine, ISegmentCollection
Key Members:IEditSketch::AddPoint, IEditSketch::FinishSketch, IFeature::Store, IPolyLine::FromPoint, ISegmentCollection::AddSegment