To Select a Database Field

Use this procedure to select a database field to insert into a drawing.

Formatting the field or query

  1. Open the Field dialog box from one of the following components:
    If you want to… Then…
    insert a database field into a text element see To Insert Fields in AutoCAD Text.
    insert a database field into an multiline text (mtext) element see To Insert Fields in AutoCAD Multiline Text.
    insert a database field into an AutoCAD table cell see To Insert Fields in AutoCAD Table Cells.
    insert a database field into an attribute definition see To Insert Fields in AutoCAD Attributes.
    insert a database field into a property set definition see To Insert Fields in Property Set Definitions.
    insert a database field into an object property see To Insert Field Placeholders in Object Properties.
    insert a database field into an object style see To Add Fields to Object Style Properties.
  2. Under Field Category, select AEC Database.
  3. Under Field Names, select DatabaseField.
  4. To select an existing database link file (UDL), click .

    In the Select Data Link dialog box, browse for the required UDL file.

  5. To create a new database link file (UDL), click one of the following buttons:
    Button Description
    Use this button if you want to create a new UDL link on a 32-bit computer.
    Use this button if you are working on a 64-bit computer, but want to create a link to a 32-bit data source.
    Use this button if you are working on a 64-bit computer, and want to create a link to a 64-bit data source.
  6. Under Path Type, specify whether you want a full path to the database or a relative path.
  7. Under Select a table or query from the database, select a table or query.
    • To select a database table, expand Tables and click on the desired table entry.
    • To select a database query, expand Queries and click on the desired query.
  8. Under Select a record and a field from the table, select the database field you want to insert in the drawing.
    Note: You can preview the database field value in the static text field on the top right of the Field dialog box. You can preview the field expression under Field expression at the bottom of the dialog box.
  9. Under Format, select a text format.

    If you have selected a field or query that does not retrieve a text string, you can format the value with an existing property data format.

  10. Click Set From Property Data format.
  11. Select a property data format, and click OK.

    The settings of the selected property data format are copied to the format codes in the field.

  12. Click OK to insert the database field in the drawing.