Available with Advanced license.
Summary
Adds a new blank or zero item to a new or existing INFO table.
Usage
This tool creates a new INFO table that is a copy of the Input Info Table with 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.
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.
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.
Syntax
AddItem(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 | The INFO table to which the item is to be added. | INFO Table |
out_info_table | The INFO table to be created. | INFO Table |
item_name | The new 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 |
item_type | 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. | INFO Item |
Code sample
AddItem example (stand-alone script)
The following stand-alone script demonstrates how to add a binary item to a coverage's point attribute table. It uses the same table as input and output so that no new table gets created.
# Name: AddItem_Example.py
# Description: Adds an item to a coverage's polygon attribute table
# Requirements: ArcInfo Workstation
# Import system modules
import arcpy
from arcpy import env
# Set environment settings
env.workspace = "C:/data"
# Set local variables
inInfoTable = "tra_airport/polygon"
outInfoTable = inInfoTable
itemName = "sites"
itemWidth = 4
outputWidth = 5
itemType = "BINARY"
# Execute AddItem
arcpy.AddItem_arc(inInfoTable, outInfoTable, itemName, itemWidth, outputWidth,
itemType, "", "")
Environments
Licensing information
- Basic: No
- Standard: No
- Advanced: Requires ArcInfo Workstation installed