ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Data.UtilityNetwork.Trace Namespace / TraceManager Class / GetTracer Method / GetTracer<T>() Method
The type of tracer to create.
Example

In This Topic
    GetTracer<T>() Method
    In This Topic
    Gets a specific Tracer instance of type T. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Overloads Function GetTracer(Of T As Tracer)() As T
    public T GetTracer<T>()
    where T: Tracer

    Type Parameters

    T
    The type of tracer to create.

    Return Value

    A specific Tracer instance corresponding to type T.
    Exceptions
    ExceptionDescription
    An exception has occurred while creating the tracer.
    This method or property must be called within the lambda passed to QueuedTask.Run
    Example
    Create a DownstreamTracer
    {
      // This routine creates a DownstreamTracer object from a UtilityNetwork
      static void CreateADownstreamTracerObject(UtilityNetwork utilityNetwork)
      {
        using TraceManager traceManager = utilityNetwork.GetTraceManager();
        DownstreamTracer downstreamTracer = traceManager.GetTracer<DownstreamTracer>();
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also