ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Data.UtilityNetwork.Trace Namespace / TraceArgument Class
Members Example

In This Topic
    TraceArgument Class
    In This Topic
    The TraceArgument class consolidates all of the input parameters to a trace.
    Object Model
    TraceArgument ClassTraceConfiguration ClassResultOptions ClassSubnetwork Class
    Syntax
    public class TraceArgument 
    Public Class TraceArgument 
    Remarks
    Different Tracer objects may subclass TraceArgument.
    Example
    Create a Trace Argument
    IReadOnlyList<Element> startingPointList = new List<Element>();
    
    // Code to fill in list of starting points goes here...
    TraceArgument traceArgument = new TraceArgument(startingPointList);
    
    TraceConfiguration traceConfiguration = new TraceConfiguration();
    
    // Code to fill in trace configuration goes here...
    traceArgument.Configuration = traceConfiguration;
    
    Trace a utility network with the digitized direction
    private void TraceWithDigitizedDirection(UtilityNetwork utilityNetwork, Element startElement)
    {
      using TraceManager traceManager = utilityNetwork.GetTraceManager();
    
      // Trace configuration with digitized direction 
      TraceConfiguration traceConfiguration = new TraceConfiguration()
      {
        IncludeIsolatedFeatures = true,
        IncludeBarriersWithResults = true,
        UseDigitizedDirection = true
      };
    
      // Trace argument
      List<Element> startElements = new List<Element> { startElement };
    
      TraceArgument traceArgument = new TraceArgument(startElements);
      traceArgument.Configuration = traceConfiguration;
    
      // Results
      DownstreamTracer downstreamTracer = traceManager.GetTracer<DownstreamTracer>();
    
      IReadOnlyList<Result> traceResults = downstreamTracer.Trace(traceArgument);
      foreach (Result traceResult in traceResults)
      {
        // Iterate trace results
      }
    }
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.Data.UtilityNetwork.Trace.TraceArgument

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also