Find Disconnected Junctions Trace Task


The Find Disconnected Junctions trace task demonstrates how to create a custom trace task using Visual Basic. The Find Disconnected Junctions trace task performs a Find Disconnected trace just like the one that is provided with ArcMap, but goes a step further to only return those disconnected junctions that are not connected to any edges.

How to use:
  1. Register the trace task with Categories.exe as an ESRI Utility Network Task.
  2. Close and restart ArcMap.
  3. Add a geometric network to ArcMap, and add the Utility Network Analyst toolbar.
  4. Using either the Edge Flag tool or the Junction Flag tool, add at least one flag to the geometric network.
  5. (Optional) On the Utility Network Analyst toolbar, click Analysis and click Disabled Layers to disable layers. To set other analysis options, click Analysis and click Options.
  6. In the Trace Task dropdown list, select the Find Disconnected Junctions trace task.
  7. Click the Solve button.


Requires: A geometric network.

Difficulty: Advanced

Visual Basic
File Description
clsFindDisconnectedJuncs.cls Class module containing the custom trace task.
FindDisconnectedJuncs.vbp The project file for the custom trace task.
FindDisconnectedJuncs.dll The compiled custom trace task.

Key CoClasses: UtilityNetworkAnalysisExt, JunctionFlagDisplay, JunctionFlag, EdgeFlagDisplay, EdgeFlag, TraceFlowSolver, EnumNetEIDArray, NetElementBarriers, SelectionSetBarriers
Key Interfaces: ITraceTask, ITraceTaskResults, INetworkAnalysisExt, INetworkAnalysisExtFlags, INetworkAnalysisExtBarriers, INetworkAnalysisExtResults, ITraceTasks, IFlagDisplay, INetFlag, INetSolver, ITraceFlowSolver2, IEnumNetEID, IEnumNetEIDBuilder, INetElements, INetTopology, INetElementBarriers, ISelectionSetBarriers
Key Members: ITraceTask::OnCreate, ITraceTask::OnTraceExecution, INetworkAnalysisExtFlags::EdgeFlag, INetworkAnalysisExtFlags::JunctionFlag, INetworkAnalysisExtBarriers::EdgeBarrier, INetworkAnalysisExtBarriers::JunctionBarrier, INetworkAnalysisExtBarriers::CreateElementBarriers, INetworkAnalysisExtBarriers::CreateSelectionBarriers, INetworkAnalysisExtResults::CreateSelection, INetworkAnalysisExtResults::SetResults, INetSolver::ElementBarriers, INetSolver::SelectionSetBarriers, INetSolver::DisableElementClass, ITraceFlowSolver::PutEdgeOrigins, ITraceFlowSolver::PutJunctionOrigins, ITraceFlowSolver2::FindFlowUnreachedElements, INetElements::IsValidElement, INetTopology::GetAdjacentEdgeCount