Create Table (Data Management) |
|
|
Release 9.2
Last modified November 29, 2010 |
Print all topics in : "Tools" |
Creates an empty geodatabase or dBASE table.
Usage tips
The following environment setting affects this tool: Configuration Keyword, extent, scratchWorkspace, and workspace .
Command line syntax
An overview of the Command Line window
CreateTable_management <out_path> <out_name> {template} {config_keyword}
| Parameter | Explanation | Data Type |
| <out_path> |
The ArcSDE, file or personal geodatabase or workspace in which the output table will be created. |
Workspace |
| <out_name> |
The table to be created. |
String |
| {template} |
A table whose attribute schema will be copied to the new output table. |
Table View |
| {config_keyword} |
The configuration keyword that determines the storage parameters of the table. |
String |
CreateTable d:\project93\data\redlands.mdb owners d:\project93\data\montgomery.mdb\owners_dat"
Scripting syntax
About getting started with writing geoprocessing scripts
CreateTable_management (out_path, out_name, template, config_keyword)
| Parameter | Explanation | Data Type |
| out_path (Required) |
The ArcSDE, file or personal geodatabase or workspace in which the output table will be created. |
Workspace |
| out_name (Required) |
The table to be created. |
String |
| template (Optional) |
A table whose attribute schema will be copied to the new output table. |
Table View |
| config_keyword (Optional) |
The configuration keyword that determines the storage parameters of the table. |
String |
# Purpose: Create a table to store customer information
# 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:/project93/data"
# Process: Create the empty table
gp.CreateTable("redlands.mdb", "customers")
# Process: Add attribute fields to table
gp.AddField("redlands.mdb/customers","name","text", "29")
gp.AddField("redlands.mdb/customers","address","text", "50")
gp.AddField("redlands.mdb/customers","zip","text","5")
gp.AddField("redlands.mdb/customers","type","text","20")
gp.AddField("redlands.mdb/customers","sales", "short")
gp.AddField("redlands.mdb/customers","code", "short")
gp.AddField("redlands.mdb/customers","own_id", "long")
except:
# If an error occurred while running a tool print the messages
print gp.GetMessages()