ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Core.Data.UtilityNetwork.Trace Namespace / DownstreamTracer Class / Trace Method / Trace(TraceArgument) Method
The input arguments to the trace.
Example

In This Topic
    Trace(TraceArgument) Method
    In This Topic
    Executes a downstream trace.
    Syntax
    Public Overloads Overrides Function Trace( _
       ByVal traceArgument As TraceArgument _
    ) As IReadOnlyList(Of Result)

    Parameters

    traceArgument
    The input arguments to the trace.

    Return Value

    A IReadOnlyList of concrete Result whose type corresponds to ResultType set in TraceArgument.ResultTypes.
    Exceptions
    Example
    Trace a utility network with the digitized direction
    {
      // This routine demonstrates how to perform a trace using the digitized direction of features
      static 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
        }
      }
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.2 or higher.
    See Also