ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Core.Data.UtilityNetwork.Trace Namespace / TraceManager Class / GetNamedTraceConfigurations Method
Represents a filter to return a desired set of NamedTraceConfigurations. If the filter consists of all empty or null lists, then return all named trace configurations.
Example

In This Topic
    GetNamedTraceConfigurations Method (TraceManager)
    In This Topic
    Gets the NamedTraceConfigurations associated with a ArcGIS.Core.Data.UtilityNetwork.UtilityNetwork. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax

    Parameters

    parameters
    Represents a filter to return a desired set of NamedTraceConfigurations. If the filter consists of all empty or null lists, then return all named trace configurations.

    Return Value

    A read-only list of NamedTraceConfigurations.
    Exceptions
    ExceptionDescription
    The utility network has a ArcGIS.Core.Data.UtilityNetwork.UtilityNetworkDefinition.GetSchemaVersion less than 5.
    A geodatabase-related exception has occurred.
    Example
    Fetch a named trace configuration by name
    private void GetNamedTraceConfigurationsByName(UtilityNetwork utilityNetwork, string configurationName)
    {
      // Query to find named trace configurations
      NamedTraceConfigurationQuery namedTraceConfigurationQuery = new NamedTraceConfigurationQuery { Names = new List<string> { configurationName } };
    
      // Get the trace manager from the utility network
      using (TraceManager traceManager = utilityNetwork.GetTraceManager())
      {
        // A set of named trace configurations specified by the named traced configuration query 
        IReadOnlyList<NamedTraceConfiguration> namedTraceConfigurations = traceManager.GetNamedTraceConfigurations(namedTraceConfigurationQuery);
    
        foreach (NamedTraceConfiguration namedTraceConfiguration in namedTraceConfigurations)
        {
          // Use NamedTraceConfiguration's object
        }
      }
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also