Delete Rule (Utility Network)

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

Syntax

arcpy.un.DeleteRule(in_utility_network, rule_type, rule_desc)
ParameterExplanationData 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.

  • ALLDelete all rules.
  • JUNCTION_JUNCTION_CONNECTIVITYDelete a junction-junction connectivity association rule.
  • CONTAINMENTDelete a containment association rule.
  • STRUCTURAL_ATTACHMENTDelete a structural attachment association rule.
  • JUNCTION_EDGE_CONNECTIVITYDelete a junction-edge connectivity rule.
  • EDGE_JUNCTION_EDGE_CONNECTIVITYDelete an edge-junction-edge connectivity rule.
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

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.DeleteRule_un("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.DeleteRule_un("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.DeleteRule_un("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.DeleteRule_un("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