Remove Rule From Relationship Class (Data Management)

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.

Parameters

LabelExplanationData Type
Input Relationship 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.

  • Checked—All relationship rules will be removed from the input relationship class.
  • Unchecked—Only rules from the origin and destination subtypes specified will be removed. This is the default.

Boolean

Derived Output

LabelExplanationData Type
Updated Relationship Class

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

Relationship Class

arcpy.management.RemoveRuleFromRelationshipClass(in_rel_class, {origin_subtype}, {destination_subtype}, {remove_all})
NameExplanationData 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 function.

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

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics