You are on page 1of 3

Within AutoCAD Map 3D, queries are the process of retrieving objects from source drawings.

This is

similar to working with queries from within databases, however in Map 3D, you're retrieving objects,

and their associated data from other drawing files, rather than simply retrieving records from a

database.

There are four different conditions that you can use in a query: location, property, data, and SQL.

The location condition enables you to specify a geographic location in the drawing that you are

selecting objects from. This uses typical AutoCAD selection methods, such as window, crossing

window, polygons, circles, buffers, or even by selecting an existing polyline, such as a boundary.

With the property condition, you can query based on AutoCAD properties, such as elevation, layer,

color, or length.

The data condition enables you to query based on Object Data.

And there is an SQL condition, which enables you to query based on external database links that are

attached through a link template.

Once you select your condition types, you need to select a query method, and there are three query

methods you can choose from: draw, preview, and report.

First and probably the most common is the draw method. This method actually copies the objects from

the source drawings into the current drawing.

The preview method brings in a preview image of all of the objects that meet the criteria of your query.

The preview is just a temporary view of the objects. They are not actually queried into the current

drawing, but rather presented to you as an image, or ADE preview object. These temporary displays

can be removed from the screen with a redraw. Previews are an excellent method to verify the results

of a query statement before committing the query through a draw method.

The final method is a report. This enables you to create a report in a comma-delimited file based on

attributes that are associated with the objects that meet the criteria of your query. This method does

not retrieve objects from the source drawing into the current drawing, but rather sends the results to

this ASCII file.

There are several purposes for performing queries.


First, queries enable you to have multiple users access the same drawings at the object level.

Traditionally in AutoCAD, when you open a drawing, that drawing is locked from anyone else who may

want to open it. With attached source drawings, multiple users can have the same source drawings

attached and only lock the individual objects within those drawings that they are working on at that

time.

Queries also enable you to access portions of large drawings that would otherwise be cumbersome to

open directly. For example, you might have a single drawing that
contains all of the parcels for an entire county. This drawing would be impractical to open and work

with directly very often, especially when considering that you are likely to only be working on a certain

portion of that drawing. Using queries, you can attach the same drawing as a source drawing, and

query only the parcels that you are interested in working with.

Queries also enable you to access multiple drawings from a single environment. In other words, you

can create a query that will return objects from a large number of drawings at the same time.

Finally, queries allow you to create themes that retrieve objects that are based on attribute values.

You might also like