Custom upstream trace task


PurposeThis sample demonstrates how to create a custom trace task. The trace task implemented in this sample performs an upstream trace that works exactly the same as the Trace Upstream task that is provided with ArcMap.


How to use

See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Open the .sln file in Visual Studio and compile it.
  2. Start ArcMap and make the Utility Network Analyst toolbar visible.
  3. Add a geometric network to the map.
  4. Using either the Edge Flag tool or the Junction Flag tool, add at least one flag to the geometric network.
  5. Optionally, 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 drop-down list, select the Custom Upstream Trace task.
  7. Click the Solve button.

CustomUpstreamTraceTaskCSharp.cs Implementation of the custom trace task.
Download the C# files
CustomUpstreamTraceTaskVBNet.vb Implementation of the custom trace task.
Download the VB.NET files

Download the files for all languages




Development licensing Deployment licensing
ArcView ArcView
ArcEditor ArcEditor
ArcInfo ArcInfo