Delete Rule (Utility Network)

Summary

Permanently deletes a rule from a utility network.

Caution should be taken when deleting rules that support existing features or objects in a utility network. Existing network features that rely on deleted rules are marked with errors when the network topology is re-enabled to indicate there is no network 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 parameter value must be from a database connection established as the database utility network owner.

Parameters

LabelExplanationData Type
Input Utility Network

The utility network for which the rule will be removed.

Utility Network; Utility Network Layer
Rule Type

Specifies the type of rule that will be deleted.

  • AllAll rules will be deleted.
  • Junction-junction connectivityA junction-junction connectivity association rule will be deleted.
  • ContainmentA containment association rule will be deleted.
  • Structural attachmentA structural attachment association rule will be deleted.
  • Junction-edge connectivityA junction-edge connectivity rule will be deleted.
  • Edge-junction-edge connectivityAn edge-junction-edge connectivity rule will be deleted.
String
Rules

Specifies the rule that will be removed, including the rule ID and the description of the rule.

Note:

To find the rule ID, browse the Rules section on the Network Properties tab on the Layer Properties dialog box. For more information, see View network rules.

String

Derived Output

LabelExplanationData Type
Updated Utility Network

The updated utility network.

Utility Network

arcpy.un.DeleteRule(in_utility_network, rule_type, rule_desc)
NameExplanationData Type
in_utility_network

The utility network for which the rule will be removed.

Utility Network; Utility Network Layer
rule_type

Specifies the type of rule that will be deleted.

  • ALLAll rules will be deleted.
  • JUNCTION_JUNCTION_CONNECTIVITYA junction-junction connectivity association rule will be deleted.
  • CONTAINMENTA containment association rule will be deleted.
  • STRUCTURAL_ATTACHMENTA structural attachment association rule will be deleted.
  • JUNCTION_EDGE_CONNECTIVITYA junction-edge connectivity rule will be deleted.
  • EDGE_JUNCTION_EDGE_CONNECTIVITYAn edge-junction-edge connectivity rule will be deleted.
String
rule_desc

Specifies the rule that will be removed, including the rule ID and the description of the rule.

Note:

To find the rule ID, browse the Rules section on the Network Properties tab on the Layer Properties dialog box. For more information, see View network rules.

String

Derived Output

NameExplanationData Type
out_utility_network

The updated utility network.

Utility Network

Code sample

DeleteRule example (Python window)

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.un.DeleteRule("Electric Network", "JUNCTION_JUNCTION_CONNECTIVITY", 
                    "2: From[ElectricDistributionDevice.ServicePoint] From[ElectricDistributionDevice.CircuitBreaker.Load]")
DeleteRule example 2 (Python window)

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.un.DeleteRule("Electric Network", "JUNCTION_EDGE_CONNECTIVITY", 
                    "72: From[ElectricDistributionLine.LowVoltage] From[ElectricDistributionDevice.CircuitBreaker.Load]")
DeleteRule example 3 (Python window)

Delete an association rule that was allowing a transformer to be contained in a junction box.

import arcpy
arcpy.un.DeleteRule("Electric Network", "CONTAINMENT", 
                    "153: From[StructureJunction.JunctionBox] To[ElectricDistributionDevice.Transformer]")
DeleteRule example 4 (Python window)

Delete a structural attachment association rule that was allowing a service point to be attached to a pole.

import arcpy
arcpy.un.DeleteRule("Electric Network", "STRUCTURAL_ATTACHMENT", 
                    "126: From[StructureJunction.Pole] To[ElectricDistributionDevice.ServicePoint]")

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics