ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Core.Data.DDL Namespace / RelationshipClassDescription Class / RelationshipRuleDescriptions Property
Example

In This Topic
    RelationshipRuleDescriptions Property
    In This Topic
    Gets the relationship rule descriptions.
    Syntax
    public List<RelationshipRuleDescription> RelationshipRuleDescriptions {get;}
    Public ReadOnly Property RelationshipRuleDescriptions As List(Of RelationshipRuleDescription)
    Example
    Add relationship rules to a relationship class
    public void ModifyRelationshipClass(SchemaBuilder schemaBuilder, AttributedRelationshipClassDefinition attributedRelationshipClassDefinition)
    {
      AttributedRelationshipClassDescription attributedRelationshipClassDescription = new AttributedRelationshipClassDescription(attributedRelationshipClassDefinition);
    
      // Update the relationship split policy
      attributedRelationshipClassDescription.RelationshipSplitPolicy = RelationshipSplitPolicy.UseDefault;
    
      // Add field in the intermediate table
      attributedRelationshipClassDescription.FieldDescriptions.Add(FieldDescription.CreateIntegerField("RelationshipStatus"));
    
      // Add relationship rules based on subtypes,if available
      // Assuming origin class has subtype with code 1
      attributedRelationshipClassDescription.RelationshipRuleDescriptions.Add(new RelationshipRuleDescription(1, null));
      
      // Enqueue modify operation
      schemaBuilder.Modify(attributedRelationshipClassDescription);
      
      // Execute modify DDL operation
      schemaBuilder.Build();
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.1 or higher.
    See Also