ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Data.UtilityNetwork Namespace / UtilityNetwork Class / GetSubnetworkManager Method
Example

In This Topic
    GetSubnetworkManager Method
    In This Topic
    Gets a SubnetworkManager object that can be used to query and edit subnetworks. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public SubnetworkManager GetSubnetworkManager()
    Public Function GetSubnetworkManager() As SubnetworkManager

    Return Value

    A SubnetworkManager object that can be used to query and edit subnetworks.
    Exceptions
    ExceptionDescription
    A geodatabase-related exception has occurred.
    This method or property must be called within the lambda passed to QueuedTask.Run
    Remarks
    In file and mobile geodatabases, the SubnetworkManager object returned by this method should not be reused after any edits in the utility network. In the event of edits, a new SubnetworkManager object should be created and used to manage the subnetworks, e.g. update the subnetwork.
    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