Table to Domain (Data Management) |
|
Release 9.2
Last modified November 29, 2010 |
![]() ![]() ![]() Print all topics in : "Tools" |
Creates or updates a coded value domain with values from a table.
Usage tips
Workspace domains can also be managed in ArcCatalog. Domains can be created and modified through the Domains tab on the Database Properties dialog box.
A domain can also be created with the Create Domain tool.
The environment settings do not have an effect on this tool.
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.
|
String |
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.
|
String |
# 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()