Delete Junctions with Edge



Description:

When an edge is deleted from a network, junctions connected to the edge remain within the network. The Delete Junctions with Edge sample deletes the selected edges and all junctions connected to one deleted edge. The sample examines end point and midspan junctions when selecting which junctions connect to only one edge. The Delete Junctions with Edge sample is implemented as command button. It is enabled when an edit session is active and the selection set contains no junction features and at least one edge feature. The EdgeFeatCount class is used when Complex Edge Features are selected. The EdgeFeatureCount method returns the number of elements connected to the specified junction. The EdgeFeatCount class takes the junction as input and determines the number of discrete edges connected to the junction.
Products:
ArcEditor: VB6

Platforms: Windows

Requires: An edit session with network junction features

Minimum ArcGIS Release: 9.0

How to use:
  1. Browse and select the DeleteJunction.dll using the 'Add From File' button on the Customize dialog.
  2. From the 'Developer Samples' commands category, add the 'Delete Junctions with Edge' command to the Editor toolbar.
  3. Load a geometric network.
  4. Start an edit session.
  5. Select an edge feature and click the command button.
  6. The edge feature and any junctions connecting only to that feature, are deleted.

Download the VB6 files
cDeleteJunction.cls Implementation for the command item.
cEdgeFeatCount.cls Returns the number of edge features connected to a Simple Junction.
DeleteJunction.vbp The project file for the sample editor command.
DeleteJunction.dll The compiled project.
deletejunction.RES The resource file for the command button.

Download the files for all languages



Key Interfaces: INetworkFeature, IEdgeFeature, ISimpleJunctionFeature, IComplexEdgeFeature
Key Members:INetworkFeature::GeometricNetwork, IEdgeFeature.ToJunctionFeature, IEdgeFeature.FromJunctionFeature, ISimpleJunctionFeature.EdgeFeatureCount, IComplexEdgeFeature.JunctionFeatureCount, IComplexEdgeFeature.JunctionFeature