ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Core.Data.UtilityNetwork.Trace Namespace / NamedTraceConfigurationQuery Class / Names Property
Example

In This Topic
    Names Property (NamedTraceConfigurationQuery)
    In This Topic
    Gets or sets the list of trace configuration names for the query.
    Syntax
    public List<string> Names {get; set;}
    Public Property Names As List(Of String)
    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.0 or higher.
    See Also