ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Data.UtilityNetwork Namespace / UtilityNetworkDefinition Class / GetNetworkSource Method
The name of the NetworkSource to return.
Version

GetNetworkSource Method
Gets a NetworkSource object with the specified name. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public NetworkSource GetNetworkSource( 
   string networkSourceName
)

Parameters

networkSourceName
The name of the NetworkSource to return.

Return Value

The NetworkSource that corresponds to networkSourceName.
Exceptions
ExceptionDescription

networkSourceName is null or an empty string.

-or-

There is no NetworkSource that corresponds to networkSourceName.

A geodatabase-related exception has occurred.
This method or property must be called within the lambda passed to QueuedTask.Run
Remarks
The string comparison used to find the name is case-insensitive.
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also