Summary
Permanently deletes a rule from a utility network.
Caution should be taken when deleting rules that support existing features in a utility network. Existing features that rely on deleted rules are marked with error features when the network topology is re-enabled to indicate there is no rule to support the relationship.
Usage
When working with an enterprise geodatabase, the connected ArcGIS Enterprise portal account must be the portal utility network owner.
The network topology must be disabled.
When working with an enterprise geodatabase, the Input Utility Network must be from a database connection established as the database utility network owner.
Syntax
arcpy.un.DeleteRule(in_utility_network, rule_type, rule_desc)
Parameter | Explanation | Data Type |
in_utility_network | The utility network for which the rule will be removed. | Utility Network; Utility Network Layer |
rule_type | The type of rule being deleted.
| String |
rule_desc | Specifies which rule to remove. This includes the rule ID and the description of the rule. Note:You can find the rule ID by browsing the Rules section of the Network Properties, which is available on the Layer Properties dialog box. | String |
Derived Output
Name | Explanation | Data Type |
out_utility_network | The updated utility network. | Utility Network |
Code sample
Delete a junction-junction connectivity association rule that allows a service point to connect to the load side of a circuit breaker in an electric network.
import arcpy
arcpy.DeleteRule_un("Electric Network", "JUNCTION_JUNCTION_CONNECTIVITY",
"2: From[ElectricDistributionDevice.ServicePoint] From[ElectricDistributionDevice.CircuitBreaker.Load]")
Delete a junction-edge connectivity rule that allows a low-voltage line to connect to the load side of a circuit breaker in an electric network.
import arcpy
arcpy.DeleteRule_un("Electric Network", "JUNCTION_EDGE_CONNECTIVITY",
"72: From[ElectricDistributionLine.LowVoltage] From[ElectricDistributionDevice.CircuitBreaker.Load]")
Delete an association rule that was allowing a transformer to be contained in a junction box.
import arcpy
arcpy.DeleteRule_un("Electric Network", "CONTAINMENT",
"153: From[StructureJunction.JunctionBox] To[ElectricDistributionDevice.Transformer]")
Delete a structural attachment association rule that was allowing a service point to be attached to a pole.
import arcpy
arcpy.DeleteRule_un("Electric Network", "STRUCTURAL_ATTACHMENT",
"126: From[StructureJunction.Pole] To[ElectricDistributionDevice.ServicePoint]")
Environments
Licensing information
- Basic: No
- Standard: Yes
- Advanced: Yes