Add Item (Coverage) (ArcInfo only) |
|
Release 9.2
Last modified February 6, 2007 |
![]() ![]() ![]() Print all topics in : "Tools" |
NOTE: This tool only works with an ArcInfo license and will only be available in ArcToolbox if you have installed ArcInfo Workstation.
Adds a blank or zero item to an INFO table.
Usage tips
Do not insert items before the cover-ID in a feature attribute table.
Do not insert items before the COUNT item in a grid VAT.
If Item Type defines a character, blanks are inserted for each record. If Item Type defines a numeric item, then zeroes are inserted for each record.
Adding items to coverage tic files is not recommended. Negative results may occur depending on the operations performed on the coverage. Clean, Copy, and other tools will maintain only the original tic items.
Add Item creates a new INFO table that is similar to the Input Info Table except that it has a new item containing blanks or zeroes. Data in other items are copied from the Input Info Table to the Output Info Table. When the Input Info Table and the Output Info Table have the same name, the item is added to the Input Info Table. Otherwise, the Output Info Table is created as a new internal INFO table, and the Input Info Table is not altered.
A similar tool, Join Info Tables, adds items by merging two INFO tables. Add Item is different from Join Info Tables in that it adds only one item at a time, and the new item values are always zero or blank. Join Info Tables may be preferable when many items are to be added from an existing INFO table.
The following environments affect this tool: derivedPrecision, newPrecision, projectCompare, scratchWorkspace, and workspace.
Command line syntax
An overview of the Command Line window
AddItem_arc <in_info_table> <out_info_table> <item_name> <item_width> <output_width> <BINARY | CHARACTER | DATE | FLOATING | INTEGER | NUMERIC> {decimal_places} {start_item}
Parameter | Explanation | Data Type |
<in_info_table> |
The INFO table to which the item is to be added. |
ArcInfo Table |
<out_info_table> |
The INFO table to be created. |
ArcInfo Table |
<item_name> |
The item to be added to the INFO table. |
String |
<item_width> |
The INFO width of the added item. Supported widths:
|
Long |
<output_width> |
The output width of the added item. This is the number of characters used to display an item value. For example, in a 2-byte integer (item type BINARY), values can be as high as 32767, which requires five characters for display. Dates can be displayed using eight (mm/dd/yy) or ten (mm/dd/yyyy) characters. For international date displays, months and days can be switched (for example, dd/mm/yy). |
Long |
<BINARY | CHARACTER | DATE | FLOATING | INTEGER | NUMERIC> |
The INFO item type of the added item.
|
String |
{decimal_places} |
The number of decimal places for the added item. This needs to be specified for INFO item types NUMERIC and FLOATING. |
Long |
{start_item} |
The item in the in_info_table after which the new item is to be added. The default start_item is the last item in the in_info_table. |
ArcInfo Item |
AddItem C:\data\polygon C:\data\polygon sites 25 25 CHARACTER
Scripting syntax
About getting started with writing geoprocessing scripts
AddItem_arc (in_info_table, out_info_table, item_name, item_width, output_width, item_type, decimal_places, start_item)
Parameter | Explanation | Data Type |
in_info_table (Required) |
The INFO table to which the item is to be added. |
ArcInfo Table |
out_info_table (Required) |
The INFO table to be created. |
ArcInfo Table |
item_name (Required) |
The item to be added to the INFO table. |
String |
item_width (Required) |
The INFO width of the added item. Supported widths:
|
Long |
output_width (Required) |
The output width of the added item. This is the number of characters used to display an item value. For example, in a 2-byte integer (item type BINARY), values can be as high as 32767, which requires five characters for display. Dates can be displayed using eight (mm/dd/yy) or ten (mm/dd/yyyy) characters. For international date displays, months and days can be switched (for example, dd/mm/yy). |
Long |
item_type (Required) |
The INFO item type of the added item.
|
String |
decimal_places (Optional) |
The number of decimal places for the added item. This needs to be specified for INFO item types NUMERIC and FLOATING. |
Long |
start_item (Optional) |
The item in the in_info_table after which the new item is to be added. The default start_item is the last item in the in_info_table. |
ArcInfo Item |
# Add an item to an Info table # Import system modules import arcgisscripting, sys, string, os gp = arcgisscripting.create() # Local variables... workspace = "c:/project93/data/" input_table = "tra_airpor/polygon" output_table = "tra_airpor/polygon" try: # Set the current workspace (to avoid having to specify the full path to the feature classes each time) gp.workspace = workspace # Process: Add Item... gp.AddItem_arc(input_table, output_table, "sites", "4", "5", "BINARY", "", "") except: # If an error occurred when running the tool, print out the error message. print gp.GetMessages()