ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Add Item

Available with Advanced license.

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

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

arcpy.arc.AddItem(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.

  • BINARY —Binary integer; requires less storage than integer
  • CHARACTER —Text
  • DATE —Date; stores day, month, and year
  • FLOATING —Floating-point binary number, either single or double precision
  • NUMERIC —Decimal number stored as one byte per digit
  • INTEGER —Integer 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

  • Current Workspace
  • Level Of Comparison Between Projection Files
  • Precision For Derived Coverages
  • Precision For New Coverages
  • Scratch Workspace

Licensing information

  • Basic: No
  • Standard: No
  • Advanced: Requires ArcInfo Workstation installed

Related topics

  • An overview of the Items toolset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal