GetNamedTraceConfigurations Method (UtilityNetworkLayer)
Gets all of the named trace configurations within the utility network layer.
This method must be called on the MCT. Use QueuedTask.Run.
Return Value
The list of named trace configurations associated with the layer.
Fetch named trace configurations from a utility network layer
{
// This routine fetches a named trace configuration by name from a utility network layer
static NamedTraceConfiguration GetNamedTraceConfigurationsFromUtilityNetworkLayer(UtilityNetworkLayer utilityNetworkLayer, string configurationName = "WaterNetwork")
{
// Get all named trace configurations in the utility network
IReadOnlyList<NamedTraceConfiguration> namedTraceConfigurations = utilityNetworkLayer.GetNamedTraceConfigurations();
foreach (NamedTraceConfiguration namedTraceConfiguration in namedTraceConfigurations)
{
if (namedTraceConfiguration.Name == configurationName)
{
return namedTraceConfiguration;
}
}
return null;
}
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)
ArcGIS Pro version: 3.0 or higher.