ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Core.Data.UtilityNetwork Namespace / SubnetworkManager Class / UpdateAllSubnetworks Method
The Tier that contains the subnetworks to be updated.
Indicates whether the processing should continue after a failure has occurred.
Example

In This Topic
    UpdateAllSubnetworks Method
    In This Topic
    Updates all the subnetworks that are part of the tier in a utility network. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public void UpdateAllSubnetworks( 
       Tier tier,
       bool continueOnFailure
    )
    Public Sub UpdateAllSubnetworks( _
       ByVal tier As Tier, _
       ByVal continueOnFailure As Boolean _
    ) 

    Parameters

    tier
    The Tier that contains the subnetworks to be updated.
    continueOnFailure
    Indicates whether the processing should continue after a failure has occurred.
    Exceptions
    ExceptionDescription
    tier is null.
    This operation cannot be invoked inside ArcGIS.Core.Data.Geodatabase.ApplyEdits or when editing is in progress.
    A geodatabase-related exception has occurred.
    This method or property must be called within the lambda passed to QueuedTask.Run
    Remarks
    • This routine generates its own editing transaction, and therefore cannot be wrapped in a separate transaction. Because the editing performed by this routine cannot be undone, this routine can also not be called within an editing session. All edits in the current edit session must be saved or discarded before calling this routine.
    • If the preexisting subnetwork state is Dirty or Clean, the new state will be Clean if successful.
    • If the preexisting subnetwork state is DirtyAndDeleted or CleanAndDeleted, the new state will be CleanAndDeleted if successful.
    • When running in a Pro add-in, ArcGIS.Desktop.Mapping.MapView.Redraw should be called with a true argument to refresh the display cache and redraw the map.
    Example
    Update all dirty subnetworks in a tier
    using (SubnetworkManager subnetworkManager = utilityNetwork.GetSubnetworkManager())
    {
      subnetworkManager.UpdateAllSubnetworks(tier, true);
    
      mapView.Redraw(true);
    }
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also