Remove Rule From Topology (Data Management)
Removes a rule from a topology.
When running this tool using scripting, the feature class ObjectClassID involved in the topology rule to be removed must be specified in parentheses after the rule name. For example
- Must Not Overlap (2) where "2" is theObjectClassID of the feature class that participates in the Must Not Overlap rule that is to be removed from the topology.
- Must Be Properly Inside (78-79) where "78" and "79" are the ObjectClassID of the feature classes that participate in the Must Be Properly Inside rule that is to be removed from the topology
Removing a rule will require the entire extent of the topology to be validated.
This tool alters the schema of the topology, therefore it requires an exclusive lock and also requires that the topology not be registerd as versioned.
The topology from which to remove a rule. This is the full path to the topology layer on disk, NOT the topology layer name in map.
The topology rule to remove from the topology.
The following script demonstrates how to use the RemoveRuleFromTopology function in the Python Window.
import arcpy from arcpy import env arcpy.RemoveRuleFromTopology_management("C:/CityData.mdb/LegalFabric/topology", "Must Not Have Dangles (21)")
The following stand-alone script demonstrates how to use the RemoveRuleFromTopology function.
# Name: RemoveRuleFromTopology_Example.py # Description: Removes a rule from a topology # Author: ESRI # Import system modules import arcpy topo = "C:/CityData.mdb/LegalFabric/topology" rule = "Must Not Have Dangles (21)" arcpy.RemoveRuleFromTopology_management(topo, rule)