Next Upstream Device Task



Description:

The Utility Network Analyst toolbar has a set of trace tasks (Find Connected, Trace Upstream, etc.) then can be used to solve many problems. The Next Upstream Device Task demonstrates how to create a custom trace task to add to the existing set of functionality. The task is designed to find the next upstream device from the specified flag based on the set of disabled layers. When performing the upstream trace, only those layers that have been disabled in the toolbar will be used for finding the next upstream device. As an example, if I want to find the next upstream valve from my flag, then I would disable only the valve layer.
Products:
ArcView: VB6

Platforms: Windows

Requires: A geometric network.

Minimum ArcGIS Release: 9.0

How to use:
  1. Register the trace task with Categories.exe as an ESRI Utility Network Task.
  2. Close and restart ArcMap.
  3. Add your network to ArcMap. Use the Add Edge Flag or Add Junction Flag tools on the Utility Network Analyst toolbar to place a flag at the location you wish to trace from.
  4. Disable one or more layers using the toolbar (disable the layers whose features you want to search for).
  5. Choose "Next Upstream Device" from the list of available trace tasks and perform the trace.
  6. Click the Solve button. The result will be a selection set up the upstream devices that stopped the trace.

Download the VB6 files
NextUpstreamDevice.cls Main class for the trace task.
NextUpstreamDevicePrj.vbp Project file for the custom trace task.
NextUpstreamDevicePrj.dll The compiled custom trace task.

Download the files for all languages



Key Libraries: EditorExt, NetworkAnalysis
Key CoClasses:UtilityNetworkAnalysisExt, TraceFlowSolver
Key Interfaces: ITraceTask, IUtilityNetworkAnalysisExt, INetworkAnalysisExt, ITraceFlowSolver
Key Members:ITraceTask::OnCreate, ITraceTask::OnTraceExecution, ITraceFlowSolver::FindFlowEndElements