Add Item (Coverage)

License Level:BasicStandardAdvanced

Summary

Adds a new blank or zero item to a new or existing INFO table.

Usage

Syntax

AddItem_arc (in_info_table, out_info_table, item_name, item_width, output_width, item_type, {decimal_places}, {start_item})
ParameterExplanationData 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:

  • BINARY—Either 2 or 4 bytes
  • CHARACTER—1 to 320 characters
  • DATE—Always 8 bytes; stored as mm/dd/yy
  • FLOATING—Either 4 bytes (single precision) or 8 bytes (double precision)
  • NUMERIC—1 to 16 digits
  • INTEGER—1 to 16 digits
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.

  • BINARYBinary integer; requires less storage than integer
  • CHARACTERText
  • DATEDate; stores day, month, and year
  • FLOATINGFloating-point binary number, either single or double precision
  • NUMERICDecimal number stored as one byte per digit
  • INTEGERInteger number stored as one byte per digit
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

Related Topics

Licensing Information

ArcGIS for Desktop Basic: No
ArcGIS for Desktop Standard: No
ArcGIS for Desktop Advanced: Requires ArcInfo Workstation installed
6/18/2012