ArcGIS Pro 2.9 API Reference Guide
GetNamedTraceConfigurations Method (UtilityNetworkLayer)
Example 

ArcGIS.Desktop.Mapping Namespace > UtilityNetworkLayer Class : GetNamedTraceConfigurations Method
Gets all of the named trace configurations within the utility network layer. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public IReadOnlyList<NamedTraceConfiguration> GetNamedTraceConfigurations()
Public Function GetNamedTraceConfigurations() As IReadOnlyList(Of NamedTraceConfiguration)

Return Value

The list of named trace configurations associated with the layer.
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
Could not get the named trace configurations.
Example
private void GetNamedTraceConfigurationsFromUtilityNetworkLayer(UtilityNetworkLayer utilityNetworkLayer)
{
  // Get all named trace configurations in the utility network
  IReadOnlyList<NamedTraceConfiguration> namedTraceConfigurations = utilityNetworkLayer.GetNamedTraceConfigurations();

  foreach (NamedTraceConfiguration namedTraceConfiguration in namedTraceConfigurations)
  {
    // Use NamedTraceConfiguration's object
  }
}
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

See Also

Reference

UtilityNetworkLayer Class
UtilityNetworkLayer Members