|
IDL Reference Guide: File Format Object Classes |
|
The IDLffShape::AddAttribute method adds an attribute definition to a Shapefile. Adding the attribute definition is required before adding the actual attribute data to a file. For more information on attributes, see Attributes.
| Note You can only define new attributes to Shapefiles that do not have any existing values in any attributes. |
Obj->[IDLffShape::]AddAttribute, Name, Type, Width [, PRECISION=integer]
Set to a string that contains the attribute name. Name values are limited to 11 characters. Arguments longer than 11 characters will be truncated.
Set to the IDL type code that corresponds to the data type that will be stored in the attribute. The valid types are:
Set to the user-defined width of the field for the data value of the attribute. The following table describes the possible values depending on the defined Type:
Set this keyword to the number of positions to be included after the decimal point. The default is 8. This keyword is only valid for fields defined as double-precision floating-point.
For an example of AddAttribute, see Creating New Shapefiles.
| Note If cities.shp already contains data in an attribute for any of the entities defined in the file, this operation will fail. |
IDL Online Help (March 06, 2007)