Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Data Management toolbox > Domains toolset > Tools

Table to Domain (Data Management)

Release 9.2
Last modified November 29, 2010
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

Creates or updates a coded value domain with values from a table.


Usage tips

Command line syntax
An overview of the Command Line window
TableToDomain_management <in_table> <code_field> <description_field> <in_workspace> <domain_name> <domain_description> {APPEND | REPLACE}

Parameter Explanation Data Type
<in_table>

The database table from which to derive domain values.

Table View
<code_field>

The field in the database table from which to derive domain code values.

Field
<description_field>

The field in the database table from which to derive domain description values.

Field
<in_workspace>

The workspace that contains the domain to be created or updated.

Workspace
<domain_name>

The name of the domain to be created or updated.

String
<domain_description>

The description of the domain to be created or updated. Domain descriptions of existing domains are not updated.

String
{APPEND | REPLACE}

If the domain already exists, specifies how the domain will be updated.

  • APPEND — Appends to the domain values from the database table.
  • REPLACE — Replaces the values in the domain with values from the database table.

String
Data types for geoprocessing tool parameters


Command line example

workspace E:\arcgis\ArcTutor\BuildingaGeodatabase
TableToDomain_management diameter.dbf code descript montgomery.mdb diameters "Valid|diameters"

Scripting syntax
About getting started with writing geoprocessing scripts
TableToDomain_management (in_table, code_field, description_field, in_workspace, domain_name, domain_description, update_option)

Parameter Explanation Data Type
in_table (Required)

The database table from which to derive domain values.

Table View
code_field (Required)

The field in the database table from which to derive domain code values.

Field
description_field (Required)

The field in the database table from which to derive domain description values.

Field
in_workspace (Required)

The workspace that contains the domain to be created or updated.

Workspace
domain_name (Required)

The name of the domain to be created or updated.

String
domain_description (Required)

The description of the domain to be created or updated. Domain descriptions of existing domains are not updated.

String
update_option (Optional)

If the domain already exists, specifies how the domain will be updated.

  • APPEND — Appends to the domain values from the database table.
  • REPLACE — Replaces the values in the domain with values from the database table.

String

Data types for geoprocessing tool parameters


Script example

# Purpose: Update an attribute domain to constrain valid|material values

# Create the Geoprocessor object
import arcgisscripting
gp = arcgisscripting.create()

try:
    # Set the workspace (to avoid having to type in the full path to the data every time)
    gp.Workspace = "E:/arcgis/ArcTutor/BuildingaGeodatabase"

    # Process: Create a domain from an existing table
    gp.TableToDomain("diameter.dbf", "code", "descript", "Montgomery.mdb", "diameters", "Valid|diameters") 

except:
    # If an error occurred while running a tool print the messages
    print gp.GetMessages()

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.