ArcGIS Pro 2.9 API Reference Guide
GetNetworkSource Method

ArcGIS.Core.Data.UtilityNetwork Namespace > UtilityNetworkDefinition Class : GetNetworkSource Method
The name of the NetworkSource to return.
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
)
Public Function GetNetworkSource( _
   ByVal networkSourceName As String _
) As NetworkSource

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, Windows 8.1

See Also

Reference

UtilityNetworkDefinition Class
UtilityNetworkDefinition Members