Represents a geodatabase coded value domain which consists of value/name pairs and acts like a database lookup table (e.g. the column values are stored as integers but looked-up as string descriptions).

Namespace:  ESRI.ArcGISExplorer.Data

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: (


public sealed class CodedValueDomain : Domain
Visual Basic (Declaration)
Public NotInheritable Class CodedValueDomain _
	Inherits Domain


A coded value domain ensures that data integrity is maintained when editing in the ArcGIS Desktop environment. The domain values are used to store data in a particular column whereas the descriptive names are simply used to improve readability when viewing the contents of the column.


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

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

    //check the Domain type
    if (domain.Type == DomainType.CodedValue)
      CodedValueDomain cvDom = domain as CodedValueDomain;

      //Print the properties for this coded value domain
      System.Diagnostics.Debug.Print(cvDom.Name);                    //Prints "ZoningCodes"
      System.Diagnostics.Debug.Print(cvDom.Type.ToString());         //Prints "CodedValue"
      System.Diagnostics.Debug.Print(cvDom.Description);             //Prints "Simplified zoning codes"
      System.Diagnostics.Debug.Print(cvDom.ColumnType.ToString());   //Prints "String"
      System.Diagnostics.Debug.Print(cvDom.Count.ToString());        //Prints "7"
Dim parcels As Table = Table.OpenFileGeodatabaseTable("C:\Data\Montgomery.gdb", "parcels")

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

  'return the Domain
  Dim dom As Domain = parcels.Columns.Item("ZONING_S").GetDomain()

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

    Dim cvDom As CodedValueDomain = DirectCast(dom, CodedValueDomain)

    'Print the properties for this coded value domain
    System.Diagnostics.Debug.Print(cvDom.Name)                    'Prints "ZoningCodes"
    System.Diagnostics.Debug.Print(cvDom.Type.ToString())         'Prints "CodedValue"
    System.Diagnostics.Debug.Print(cvDom.Description)             'Prints "Simplified zoning codes"
    System.Diagnostics.Debug.Print(cvDom.ColumnType.ToString())   'Prints "String"
    System.Diagnostics.Debug.Print(cvDom.Count.ToString())        'Prints "7"
  End If
End If

Inheritance Hierarchy




See Also