Skip To Content

Remove Rule From Relationship Class

Summary

Removes a rule from a relationship class.

Learn more about relationship rules

Usage

  • If the relationship class is stored in an enterprise geodatabase, this tool can only be successfully run as the data owner.

Syntax

RemoveRuleFromRelationshipClass_management (in_rel_class, {origin_subtype}, {destination_subtype}, {remove_all})
ParameterExplanationData Type
in_rel_class

The relationship class with the rule to remove.

Relationship Class
origin_subtype
(Optional)

If the origin class has subtypes, the subtype that is associated with the relationship class rule to be deleted.

String
destination_subtype
(Optional)

If the destination class has subtypes, the subtype that is associated with the relationship class rule to be deleted.

String
remove_all
(Optional)

Specifies the relationship rules to be removed from the relationship class.

  • REMOVEAll relationship rules will be removed from the input relationship class.
  • NOT_ALLOnly rules from the origin and destination subtypes specified will be removed. This is the default.
Boolean

Derived Output

NameExplanationData Type
out_rel_class

The updated input relationship class with the relationship class rule removed.

Relationship Class

Code sample

RemoveRuleFromRelationshipClass example (Python window)

Remove a relationship rule between the Residential subtype and the House subtype from the ParcelsToBuildings relationship class using the RemoveRuleFromRelationshipClass tool.

import arcpy
arcpy.RemoveRuleFromRelationshipClass_management(
    "C:\\MyProject\\sdeConn.sde\\progdb.user1.ParcelsToBuildings", "Residential", 
    "House")

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics