To Create a Data Link to an ODBC Source

You can link data from a number of data sources to an AutoCAD Architecture 2022 toolset drawing. You can use the following database providers for linking to data sources:

These database providers let you link to the following data sources:

Note: The instruction below describes the process of creating a link to a data source from a Microsoft Excel file. In the same way, can create data links to Microsoft Access databases, plain ASCII text files, and comma-separated files.

Creating a data link to a Microsoft Excel file

  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. 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.
  5. Click the Provider tab.

  6. Select Microsoft OLE DB Provider for ODBC Drivers, and click Next.
  7. In the Connection tab, click Use connection string.

  8. Click Build.

  9. Click New to build to a new DSN file.

  10. In the Create New Data Source dialog box, select the Microsoft Excel Driver (*.xls).
    Note: The other supported drivers here are Microsoft Access Driver (*.mdb) and Microsoft Text Driver (*.txt, *.csv). You can use these to create a link to an Access database, a plain ASCII text file, or a comma-separated file.
  11. Click Next.

  12. Enter a name for the new DSN file, and click Next.
  13. Confirm that your data source settings are correct, and click Finish.
  14. In the ODBC Microsoft Excel Setup dialog box, select the version of Microsoft Excel that the DSN file should support.
  15. Click Select Workbook.

  16. Select an XLS file that should be used as your data source, and click OK three times until you are back in the Connection tab of the Data Link Properties dialog box.

    The Microsoft Excel file you have selected as your data source is displayed under Connection String.

  17. To verify that the connection to the data source is working correctly, click Test Connection.
  18. Enter a user name and optionally a password for the database connection.
  19. Under Enter the initial catalog to use, select the Excel file from the drop-down list.
  20. Optionally, you can click the Advanced tab to define network and permission settings.
  21. If you have selected a data source on a network server, you can define the network settings.
  22. Define the access permissions for the data source.
  23. Optionally, you can click the All tab to view and edit the OLE DB initialization properties available for the selected OLE DB provider.
  24. Click OK.
  25. In the Field dialog box, the selected Excel file is displayed as the data source.

    You can select data tables and entries as described in To Select a Database Field.