ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.Data.DDL Namespace / SchemaBuilder Class / Create Method / Create(CodedValueDomainDescription) Method
Indicates the ArcGIS.Core.Data.CodedValueDomain to be created.
Example

In This Topic
    Create(CodedValueDomainDescription) Method
    In This Topic
    Enqueue the create operation on the object referred to by the CodedValueDomainDescription.
    Syntax

    Parameters

    codedValueDomainDescription
    Indicates the ArcGIS.Core.Data.CodedValueDomain to be created.

    Return Value

    Exceptions
    Example
    Creating a CodedValue domain
    // Create a CodedValueDomain description for water pipes
    CodedValueDomainDescription codedValueDomainDescription = new CodedValueDomainDescription("WaterPipeTypes", FieldType.String,
      new SortedList<object, string> { { "Copper", "C_1" },
        { "Steel", "S_2" } })
    {
      SplitPolicy = SplitPolicy.Duplicate,
      MergePolicy = MergePolicy.DefaultValue
    };
    
    SchemaBuilder schemaBuilder = new SchemaBuilder(geodatabase);
    
    // Create a coded value domain 
    CodedValueDomainToken codedValueDomainToken = schemaBuilder.Create(codedValueDomainDescription);
    schemaBuilder.Build();
    
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also