Add Rule To Topology (Data Management)

License Level:BasicStandardAdvanced

Summary

Adds a new rule to a topology.

The rules you choose to add depend on the spatial relationships that you wish to monitor for the feature classes that participate in the topology.

For a complete list and description of the available topology rules see Geodatabase topology rules and topology error fixes

Usage

Syntax

AddRuleToTopology_management (in_topology, rule_type, in_featureclass, {subtype}, {in_featureclass2}, {subtype2})
ParameterExplanationData Type
in_topology

The topology to which the new rule will be added.

Topology Layer
rule_type

The topology rule to be added. For a complete list of the rules and what they do, see the tool's help page.

String
in_featureclass

The input or origin feature class.

Feature Layer
subtype
(Optional)

The subtype for the input or origin feature class. Enter the subtype's description (not the code). If subtypes do not exist on the origin feature class, or you want the rule to be applied to all subtypes in the feature class leave this blank.

String
in_featureclass2
(Optional)

The destination feature class for the topology rule.

Feature Layer
subtype2
(Optional)

The subtype for the destination feature class. Enter the subtype's description (not the code). If subtypes do not exist on the origin feature class, or you want the rule to be applied to all subtypes in the feature class leave this blank.

String

Code Sample

AddFeatureClassToTopology stand-alone script

The following stand-alone script demonstrates how to use the AddRuleToTopology function.

# Name: AddRuleToTopology_Example.py
# Description: Adds a rule to a topology
# Author: ESRI

# Import system modules
import arcpy

# Any intersection of ParcelOutline (BlockLines subtype only) needs to be reviewed
arcpy.AddRuleToTopology_management("C:/Landbase.mdb/LegalFabric/topology", "Must Not Intersect (Line)", "C:/Landbase.mdb/LegalFabric/ParcelOutline", "BlockLines", "", "", )

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: No
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
11/18/2013