ArcGIS Pro 3.7 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
    {
      // This routine fetches a named trace configuration by name from a utility network
      static NamedTraceConfiguration GetNamedTraceConfigurationsByName(UtilityNetwork utilityNetwork, string configurationName = "WaterNetwork")
      {
        // 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);
          NamedTraceConfiguration waterConfiguration =
            namedTraceConfigurations.First(f => f.Description.Equals(configurationName));
    
          return waterConfiguration;
        }
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also