Enables a feature corresponding to to be a
SubnetworkController and adds it to an existing
Subnetwork corresponding to . If the specified subnetwork does not exist, a new one will be created. This method must be called on the MCT. Use QueuedTask.Run.
Parameters
- tier
- The Tier to which the Subnetwork is created.
- device
- Corresponds to the feature to be enabled as a SubnetworkController. This 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.
Life cycle for a mesh subnetwork with multiple controllers
// Create a subnetwork named "Mesh1" from three controllers
// elementM1, elementM2, and elementM3 represent the devices that serve as subnetwork controllers (e.g., network protectors)
subnetworkManager.EnableController(lowVoltageMeshTier, elementM1, "Mesh1", "M1", "my description", "my notes");
subnetworkManager.EnableController(lowVoltageMeshTier, elementM2, "Mesh1", "M2", "my description", "my notes");
Subnetwork subnetworkMesh1 = subnetworkManager.EnableController(lowVoltageMeshTier, elementM3, "Mesh1", "M3", "my description", "my notes");
subnetworkMesh1.Update();
MapView.Active.Redraw(true);
// ...
// When deleting the subnetwork, each controller must be disabled before the subnetwork itself is deleted
subnetworkManager.DisableControllerInEditOperation(elementM1);
subnetworkManager.DisableControllerInEditOperation(elementM2);
subnetworkManager.DisableControllerInEditOperation(elementM3);
// After the subnetwork is deleted, all of the rows that have been labeled with the subnetwork ID need to be updated
subnetworkMesh1.Update();
MapView.Active.Redraw(true);
// The final step is to notify external systems (if any) using the Export Subnetwork geoprocessing tool
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3 or higher.