To Create Drawing Layers Based on Attached Data

In your map, you can add a drawing layer in Display Manager that contains objects based on attribute data associated with the object, for example, object data or data in a linked external database.

To bring in drawing objects based on object data

  1. Do one of the following:
    • In Display Manager, click DataAdd Drawing DataQuery Current Drawing.
    • In Display Manager, click DataAdd Drawing DataQuery Source Drawing. Be sure you have attached the DWG files to query.
    • In Display Manager, click DataAdd Drawing DataQuery Topology.
  2. In the Define Query dialog box, click Data.
  3. In the Data Condition dialog box, select the type of data to use.
  4. Specify the location of the data.
    • To retrieve objects based on object class, in the Class list, select the object class of the objects to retrieve. Under Properties, select the specific properties to query.
    • To retrieve objects based on object data, select the table and field to query.

      If two attached drawings have a table with the same name, AutoCAD Map 3D toolset recognizes only the fields defined in the first drawing you activate.

    • To retrieve objects based on database link data, in the Link Template list, select the link template associated with the objects to retrieve. Under Key Columns, select the key column to query.

      To search for objects in attached drawings, only link templates defined in your attached drawing are displayed in the list.

    • To retrieve objects based on block attribute information, in the Blocks list, select the block that contains the attribute tag information to query. Under Attribute Tags, select the attribute tag to query, or select * in the Blocks list to see a list of all the attribute tags of all the blocks in the active drawing.
  5. Select an operator.

    When you query database link data, only the = operator is available.

  6. Enter the data value.

    You can use wild-card characters for Value. For more information about wild cards, see Wild-Card Characters.

  7. Click OK.
  8. In the Define Query dialog box, click OK.

To bring in drawing objects based on external (SQL) data

  1. Do one of the following:
    • In Display Manager, click DataAdd Drawing DataQuery Current Drawing.
    • In Display Manager, click DataAdd Drawing DataQuery Source Drawing. Be sure you have attached the DWG files to query.
    • In Display Manager, click DataAdd Drawing DataQuery Topology.
  2. In the Define Query dialog box, click SQL.
  3. In the SQL Link Condition dialog box, select the link template for the table to search.

    If you chose Attached Drawings in Step 1, the link template list includes only link templates for active attached drawings. If the link template is not listed, verify that it is defined in the attached drawing.

  4. Create a SQL condition by selecting a column, an operator, and a value.

    To type the condition, click Type Condition.

  5. Click Add Condition to add the condition to the Current SQL Condition list.
  6. To add more conditions, select And or Or. Create another condition.
  7. When you finish building the SQL condition, click OK.
  8. Optionally, define another condition.
  9. In the Define Query dialog box, click OK.

The new layer appears in Display Manager. Objects that meet the conditions of the query are included in this layer. To see the objects, you may need to zoom to the drawing extents.