Define Block Database Links

This command creates links between attributes in drawing blocks and fields in database tables for Microsoft® Access, Microsoft® Excel and DBase. The command works through the dialog shown. At the top of the dialog, you specify the database and table to process. Highlight the database and table to process from the lists. To add a database to the available list, use the Attach Database button. This routine brings up a file selection dialog to choose the database file name. Under the "Files of type" field, you can choose between selecting Microsoft® Access, Microsoft® Excel or DBase database files.

After selecting the database table to use, the key field from the table must be specified. Highlight a field name from the Fields list and then pick the Set Key Field button. One of the block attribute links to the database fields must use this field name so that the program can link the block entity with the database record and fill out the other values. For example, consider a block with three attributes: lot_ id, owner_name and area. The database table has the following fields: ID, name and area. The database field of ID could be set as the key field and linked to the block attribute called lot_id. Also the database field of name could be linked to attribute owner_name and area linked with area. Programs such as Update Block Data will use the value in the attribute of lot_id to lookup the database record with the matching value in the ID field. Then the values in the owner_name and area block attributes can be filled out from this database record.

The program lists all the block definitions found in the drawing. Highlight a block name to link to from this list. Then the program will list all the attributes for this block. To create a link, choose an attribute and a field from the database table. Then you can pick the Add Link button to link this block attribute with this database field. The links for a block can be saved and recalled by block name using the Save and Load buttons.

One application of this command is for linking drawing title blocks to a customer database. For example, the drawing title block and the database could contain a customer ID, name, address, etc. The customer ID could be used as the key field. Then you could just fill out the customer ID in the title block and then use the Update Block Data command to fill out the rest of the customer data in the title block.

Pulldown Menu Location: GIS Data
Keyboard Command: define_blk
Prerequisite:
Block in drawing and database file