ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Data.DDL Namespace / SchemaBuilder Class / Modify Method / Modify(DomainDescription) Method
Indicates the ArcGIS.Core.Data.Domain to be modified.
Example

In This Topic
    Modify(DomainDescription) Method
    In This Topic
    Enqueue the modify operation on the object referred to by the DomainDescription. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public void Modify( 
       DomainDescription domainDescription
    )
    Public Overloads Sub Modify( _
       ByVal domainDescription As DomainDescription _
    ) 

    Parameters

    domainDescription
    Indicates the ArcGIS.Core.Data.Domain to be modified.
    Exceptions
    ExceptionDescription
    domainDescription is null.
    Example
    Modifying domain
    public void ModifyDomain(Geodatabase geodatabase, string codedValueDomainName = "Pipe")
    {
        SchemaBuilder schemaBuilder = new SchemaBuilder(geodatabase);
        CodedValueDomain codedValueDomain = geodatabase.GetDomains().First(f => f.GetName().Equals(codedValueDomainName)) as CodedValueDomain;
        CodedValueDomainDescription codedValueDomainDescription = new CodedValueDomainDescription(codedValueDomain);
    
        // Update domain description
        codedValueDomainDescription.Description = "Water Pipe Domain";
    
        // Adding code/value pair
        codedValueDomainDescription.CodedValuePairs.Add("C", "Copper");
    
        schemaBuilder.Modify(codedValueDomainDescription);
    
        // To modify the orders of coded value domain
        // schemaBuilder.Modify(codedValueDomainDescription,SortBy.Name,SortOrder.Ascending);
    
        schemaBuilder.Build();
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.1 or higher.
    See Also