ArcGIS Pro 2.6 API Reference Guide
EnableControllerInEditOperation Method

ArcGIS.Core.Data.UtilityNetwork.Extensions Namespace > UtilityNetworkExtensions Class : EnableControllerInEditOperation Method
The ArcGIS.Core.Data.UtilityNetwork.SubnetworkManager instance used to add a controller to an existing or newly-created subnetwork.
The ArcGIS.Core.Data.UtilityNetwork.Tier to which the ArcGIS.Core.Data.UtilityNetwork.Subnetwork is created.
Corresponds to the feature to be enabled as a ArcGIS.Core.Data.UtilityNetwork.SubnetworkController. This ArcGIS.Core.Data.UtilityNetwork.Element must specify a terminal, and this terminal must be specified as a Controller Terminal in the terminal definition.
Name of the subnetwork.
Name of the subnetwork controller.
A description for the subnetwork controller.
Additional notes for the subnetwork controller.
Enables a feature corresponding to device to be a ArcGIS.Core.Data.UtilityNetwork.SubnetworkController and adds it to an existing ArcGIS.Core.Data.UtilityNetwork.Subnetwork corresponding to subnetworkName. If the specified subnetwork does not exist, a new one will be created. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
Public Shared Function EnableControllerInEditOperation( _
   ByVal subnetworkManager As SubnetworkManager, _
   ByVal tier As Tier, _
   ByVal device As Element, _
   ByVal subnetworkName As String, _
   ByVal controllerName As String, _
   ByVal description As String, _
   ByVal notes As String _
) As Subnetwork

Parameters

subnetworkManager
The ArcGIS.Core.Data.UtilityNetwork.SubnetworkManager instance used to add a controller to an existing or newly-created subnetwork.
tier
The ArcGIS.Core.Data.UtilityNetwork.Tier to which the ArcGIS.Core.Data.UtilityNetwork.Subnetwork is created.
device
Corresponds to the feature to be enabled as a ArcGIS.Core.Data.UtilityNetwork.SubnetworkController. This ArcGIS.Core.Data.UtilityNetwork.Element must specify a terminal, and this terminal must be specified as a Controller Terminal in the terminal definition.
subnetworkName
Name of the subnetwork.
controllerName
Name of the subnetwork controller.
description
A description for the subnetwork controller.
notes
Additional notes for the subnetwork controller.

Return Value

The newly-created or modified subnetwork.
Exceptions
ExceptionDescription

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

-or-

The ArcGIS.Desktop.Mapping.UtilityNetworkLayer is unavailable.

-or-

If the ArcGIS.Core.Data.UtilityNetwork.Terminal in device is null and the associated ArcGIS.Core.Data.UtilityNetwork.TerminalConfiguration has multiple terminals.

This method must be called on the Main CIM Thread. Use QueuedTask.Run.
A geodatabase-related exception has occurred.
Remarks
If this operation is successful, it will invalidate the affected layers and cause the ArcGIS.Desktop.Mapping.MapView to redraw.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

UtilityNetworkExtensions Class
UtilityNetworkExtensions Members