Create and Edit Links and Link Templates
 
 
 

Each link requires a link template, which identifies what fields from a table are associated with the links that use that template.

The primary function of the database connectivity feature is to associate external data with program graphical objects. You can, for example, associate information contained in a room database with a polyline object representing a room boundary in a drawing. You establish the association between the graphical object and the database table by creating a link, which references one or more records stored in the database table. You cannot create links to nongraphical objects such as layers and linetypes.

Links are tightly connected with the graphical objects they are associated with. If you move or copy a linked object, the link is moved or copied with it. If you delete a linked object, the link is also deleted.

When you create a link, a dynamic relationship is established between the database record and the object. If, for example, you convert a room from a storage area to an office in the database table, the program provides a mechanism to update the information stored in the drawing so that it matches the database table.

To establish links between database table records and graphical objects, you must first create a link template. Link templates identify what fields from a database table are associated with the links that share that template. For example, you can create a link template that uses the field Room Number from a room database table. You can then use this link template to create links that point to different records in the database table.

Link templates also function as shortcuts that point to the database tables that they're based on. You can use the link templates that are associated with a drawing to open the database tables that they reference for viewing or editing. This is particularly useful if you have a large number of data sources configured on your system. Rather than scrolling through a list of data sources each time you want to locate an individual database table, you can open it directly from the drawing node of the drawing that it is associated with. To open a link template's database table, right-click a link template in the dbConnect Manager. Click View Table or Edit Table.

You can attach multiple links using different link templates to a single graphical object. This is useful when you want to associate data from multiple database tables with an individual object.

Links in External References and Blocks

Links stored in externally referenced drawings cannot be viewed or modified in the master drawing that they're attached to. This information is only available when you open the source drawing directly.

Links contained in blocks are available, but can only be accessed through the REFEDIT command.

Edit Link Templates

Occasionally after creating a link template, you may want to edit it. For example, you might decide to add an additional key field or remove an existing one. You may also need to update a link template if any changes are made to the data source it points to. For example, you might rename a database table or move it to a different location.

NoteYou can only change the key fields of link templates that don't have any links defined in their associated drawing. Changing the key fields of a link template invalidates its links and breaks their association to the database table. To edit a link template with links already defined, you must first delete all links based on the link template from its associated drawing.

Edit Links

After you have created links, you may periodically need to update their key field values. For example, you might change the numbering scheme for a group of offices, or reallocate some rooms from the accounting department to the sales department. You can use the Link Manager to enter new key values for a selected link. The key values must reference a record that already exists in the source database table.