ade_odaddfield

AutoCAD Map 3D AutoLISP

Up a level
ade_odaddfield
 
 

Adds fields to a table.

(ade_odaddfield tabname fieldlist)

Returns T or nil.

tabname Table name (string) can be up to 25 characters long. Must be unique, contain no spaces, and start with an alphanumeric character
fieldlist List of fields to add. A sequence of field definitions.

A sequence of field definitions is introduced by the string "columns". Each field definition is a list of a-lists, and each a-list consists of a field property and a value, as follows:

Field propertyValue
colname Field name (string) can be up to 31 characters long. Must be unique, contain no spaces, and start with an alphanumeric character.
coldesc Field description (string)
coltype Field data type
defaultval Default field value

The function adds fields to the table and to each of its records. In each record, the new fields are assigned default values in accord with their field definitions. The function has no effect on existing fields. In other words, the function adds fields to each set of object data defined by the table and attached to an object.

For an example, see Adding Fields to a Table.