ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.Data.UtilityNetwork.Trace Namespace / Tracer Class
Members Example

In This Topic
    Tracer Class
    In This Topic
    Tracer is an abstract base class that provides tracing capabilities.
    Object Model
    Tracer ClassUtilityNetwork Class
    Syntax
    public abstract class Tracer 
    Public MustInherit Class Tracer 
    Remarks
    ArcGIS Pro ships with a number of pre-defined Tracer objects. Additional custom traces can be defined by subclassing the Tracer object. Tracer objects are created and obtained by calling TraceManager.GetTracer().
    Example
    Trace a utility network using a named trace configuration
    private void TraceUtilityNetworkUsingNamedTraceConfiguration(UtilityNetwork utilityNetwork, NamedTraceConfiguration namedTraceConfiguration, Element startElement)
    {
      // Get the trace manager from the utility network
      using (TraceManager traceManager = utilityNetwork.GetTraceManager())
      {
        // Get a tracer from the trace manager using the named trace configuration
        Tracer upstreamTracer = traceManager.GetTracer(namedTraceConfiguration);
        
        // Trace argument holding the trace input parameters
        TraceArgument upstreamTraceArgument = new TraceArgument(namedTraceConfiguration, new List<Element> {startElement});
        
        // Trace results 
        IReadOnlyList<Result> upstreamTraceResults = upstreamTracer.Trace(upstreamTraceArgument);
      }
    }
    Inheritance Hierarchy
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also