ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.Data.UtilityNetwork Namespace / UtilityNetworkExtensions Class / ValidateNetworkTopologyInEditOperation Method / ValidateNetworkTopologyInEditOperation(UtilityNetwork) Method
The UtilityNetwork instance whose network topology is to be validated.

ValidateNetworkTopologyInEditOperation(UtilityNetwork) Method
Validates the utility network topology in an edit operation. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public static ValidationResult ValidateNetworkTopologyInEditOperation( 
   UtilityNetwork utilityNetwork
)

Parameters

utilityNetwork
The UtilityNetwork instance whose network topology is to be validated.

Return Value

A ValidationResult that describes the result of the operation.
Exceptions
ExceptionDescription

The active ArcGIS.Desktop.Mapping.MapView is unavailable.

-or-

The ArcGIS.Desktop.Mapping.UtilityNetworkLayer is unavailable.

This method must be called on the Main CIM Thread. Use QueuedTask.Run.
A geodatabase-related exception has occurred.
Remarks
  • This routine creates its own edit operation, and can therefore not be called within an existing transaction.
  • If this operation is successful, it will create an edit operation on the Pro undo/redo stack, invalidate the affected layers and cause the ArcGIS.Desktop.Mapping.MapView to redraw. When writing a CoreHost application, use UtilityNetwork.ValidateNetworkTopology.
  • For services-based UtilityNetwork, this method defaults to ArcGIS.Core.Data.ServiceSynchronizationType.Asynchronous. Note that this C# routine is still synchronous; the current thread will block until the routine completes.
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

ArcGIS Pro version: 3.0 or higher.
See Also