Click here to view all files
 
Represents a geodatabase range domain which ensures that the values in a Column must be between the minimum and maximum specified values.

Namespace:  ESRI.ArcGISExplorer.Data
Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.900 (2.0.0.900)

Syntax

C#
public sealed class RangeDomain : Domain
Visual Basic (Declaration)
Public NotInheritable Class RangeDomain _
	Inherits Domain

Remarks

A range domain ensures that data integrity is maintained when editing in the ArcGIS Desktop environment. For example, if the domain has a minimum value of 100 an a maximum value of 200, then the Column against which this domain is defined will only allow the storage of numbers within this range.

Examples

The code below returns the RangeDomain associated with a column in a geodatabase feature class and then prints out the properties.
CopyC#
{
  Table fittings = Table.OpenFileGeodatabaseTable(@"C:\Data\Montgomery.gdb", "fittings");

  //check that the "ANGLE" column of the "fittings" feature class has a Domain assigned.
  if (fittings.Columns["ANGLE"].HasDomain)
  {
    //return the Domain
    Domain domain = fittings.Columns["ANGLE"].GetDomain();

    //check the Domain type
    if (domain.Type == DomainType.Range)
    {
      RangeDomain rangeDom = domain as RangeDomain;

      //Print the properties for this range domain
      System.Diagnostics.Debug.Print(rangeDom.Name);                    //Prints "RotAngle"
      System.Diagnostics.Debug.Print(rangeDom.Type.ToString());         //Prints "Range"
      System.Diagnostics.Debug.Print(rangeDom.Description);             //Prints "Valid rotation angles"
      System.Diagnostics.Debug.Print(rangeDom.ColumnType.ToString());   //Prints "Integer"
      //Print the minimum and maximum values that the "Angle" Column can store
      System.Diagnostics.Debug.Print(rangeDom.MinValue.ToString());     //Prints "0"
      System.Diagnostics.Debug.Print(rangeDom.MaxValue.ToString());     //Prints "359"  
    }
  }       
}
CopyVB.NET
Dim fittings As Table = Table.OpenFileGeodatabaseTable("C:\Data\Montgomery.gdb", "fittings")

'check that the "ANGLE" column of the "fittings" feature class has a Domain assigned.
If (fittings.Columns.Item("ANGLE").HasDomain) Then

  'return the Domain
  Dim dom As Domain = fittings.Columns.Item("ANGLE").GetDomain()

  'check the Domain type
  If (dom.Type = DomainType.Range) Then

    Dim rangeDom As RangeDomain = DirectCast(dom, RangeDomain)

    'Print the properties for this range domain
    System.Diagnostics.Debug.Print(rangeDom.Name)                    'Prints "RotAngle"
    System.Diagnostics.Debug.Print(rangeDom.Type.ToString())         'Prints "Range"
    System.Diagnostics.Debug.Print(rangeDom.Description)             'Prints "Valid rotation angles"
    System.Diagnostics.Debug.Print(rangeDom.ColumnType.ToString())   'Prints "Integer"
    'Print the minimum and maximum values that the "Angle" Column can store
    System.Diagnostics.Debug.Print(rangeDom.MinValue.ToString())     'Prints "0"
    System.Diagnostics.Debug.Print(rangeDom.MaxValue.ToString())     'Prints "359"  
  End If
End If

Inheritance Hierarchy

System..::.Object
  ESRI.ArcGISExplorer.Data..::.Domain
    ESRI.ArcGISExplorer.Data..::.RangeDomain

See Also

Relate Topics:
  RangeDomain Members
  RangeDomain Methods
  RangeDomain Properties
Created by Atop CHM to web converter,© 2009 all right reserved.