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.

In This Topic
    ValidateNetworkTopologyInEditOperation(UtilityNetwork) Method
    In This Topic
    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
    )
    Public Overloads Shared Function ValidateNetworkTopologyInEditOperation( _
       ByVal utilityNetwork As UtilityNetwork _
    ) As ValidationResult

    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

    See Also