Domain to Table (Data Management) |
|
Release 9.2
Last modified November 29, 2010 |
![]() ![]() ![]() Print all topics in : "Tools" |
Creates a table from an attribute domain.
Usage tips
Creating a table from an attribute domain allows for additional editing of the table in ArcMap. For example, a table could be created from a coded value domain, additional code values could be added to the coded value list, and the Table To Domain tool could be used to update the original domain.
The following environment setting affects this tool: Configuration Keyword.
Workspace domains can also be managed in ArcCatalog. Domains can be created and modified through the Domains tab on the Database Properties dialog box.
The environment settings do not have an effect on this tool.
Command line syntax
An overview of the Command Line window
DomainToTable_management <in_workspace> <domain_name> <out_table> <code_field> <description_field> {configuration_keyword}
Parameter | Explanation | Data Type |
<in_workspace> |
The workspace containing the attribute domain to be converted to a table. |
Workspace |
<domain_name> |
The name of the existing attribute domain. |
String |
<out_table> |
The table to be created. |
Table |
<code_field> |
The name of the field in the created table that will store code values. |
String |
<description_field> |
The name of the field in the created table that will store code value descriptions. |
String |
{configuration_keyword} |
For SDE tables, the custom storage keywords for creating the table. |
String |
workspace E:\arcgis\ArcTutor\BuildingaGeodatabase DomainToTable_management montgomery.mdb DistDiam diameters code descript
Scripting syntax
About getting started with writing geoprocessing scripts
DomainToTable_management (in_workspace, domain_name, out_table, code_field, description_field, configuration_keyword)
Parameter | Explanation | Data Type |
in_workspace (Required) |
The workspace containing the attribute domain to be converted to a table. |
Workspace |
domain_name (Required) |
The name of the existing attribute domain. |
String |
out_table (Required) |
The table to be created. |
Table |
code_field (Required) |
The name of the field in the created table that will store code values. |
String |
description_field (Required) |
The name of the field in the created table that will store code value descriptions. |
String |
configuration_keyword (Optional) |
For SDE tables, the custom storage keywords for creating the table. |
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" # Set variable for domain name domname = "Material" # Process: Remove the constraint from the material field gp.RemoveDomainFromField("Montgomery.mdb/Water/DistribMains", "MATERIAL") # Edit the domain values # Process: Remove a coded value from the domain gp.DeleteCodedValueFromDomain("Montgomery.mdb", domname, "ACP: Asbestos concrete") # Process: Create a table from the domain to edit it with ArcMap editing tools gp.DomainToTable("Montgomery.mdb", domname, "Montgomery.mdb/" + domname , "TYPE", "DESCRIPT") # Process: Delete the domain gp.DeleteDomain("Montgomery.mdb", domname) # Edit the domain table outside of geoprocessing # and then bring the domain back in with the TableToDomain process except: # If an error occurred while running a tool print the messages print gp.GetMessages()