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

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

    Parameters

    rangeDomainDescription
    Indicates the ArcGIS.Core.Data.RangeDomain to be created.

    Return Value

    Exceptions
    ExceptionDescription
    For Enterprise geodatabases, ArcGIS.Core.Data.FieldType.Single is invalid for domains. Consider using ArcGIS.Core.Data.FieldType.Double instead.
    rangeDomainDescription is null.
    Example
    Creating a Range domain
    // Create a range description with minimum value = 0 and maximum value = 1000
    RangeDomainDescription rangeDomainDescriptionMinMax = new RangeDomainDescription("RangeDomain_0_1000",
      FieldType.Integer, 0, 1000)
    { Description = "Domain value ranges from 0 to 1000" };
    
    SchemaBuilder schemaBuilder = new SchemaBuilder(geodatabase);
    
    // Create  a range domain 
    schemaBuilder.Create(rangeDomainDescriptionMinMax);
    schemaBuilder.Build();
    
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also