Define Query dialog box

Use this dialog box to define, modify, save, load, or execute queries.

The dialog box settings reflect the properties of the current query. If you change a setting, you modify the current query. If you load a query from the query library or from a file, you replace the current query.

Press either Execute Query or OK:

Execute Query

Save dialog box settings and execute the current query.

OK

Save dialog box settings without executing. Click OK to create an element for the Display Manager.

Note: You can set several query options. See the Query tab of the Autodesk Map Options dialog box.

Current Query

This area shows the conditions in your current query. You can edit, group, or delete the conditions.

Current Query List

View all conditions in the current query. If conditions have been grouped, the group is indented and enclosed within parentheses. (Conditions in a group are evaluated before conditions outside the group.)

  • To edit a condition, select it. Click Edit.
  • To group conditions, select the first and last condition that you want in the group. Click Group.
  • To delete a condition, select it. Click Delete.
Edit

Edit the selected condition.

If you select more than one condition, Edit is unavailable.

You can also edit a condition by double-clicking it in the list.

Group

Group the selected conditions.

When you run the query, conditions inside the group are evaluated before conditions outside the group.

The easiest way to specify a group is to select the first and last conditions in the group and click Group. All conditions between the first and the last selected conditions are included in the group and enclosed within parentheses.

You can nest groups.

Ungroup

Ungroup the selected group.

To ungroup conditions, select the first or last condition in the group. Click Ungroup.

Delete

Deletes the selected query condition.

Clear Query

Delete all conditions in the list.

Clearing the query does not remove settings from the Set Property Alterations dialog box or from the Output Report Options dialog box.

Query type

Use this area to create conditions for your query.

And/Or/Not options

Determine how the condition is combined with other conditions.

And specifies that both conditions must be met for the object to be included in the query.

Or specifies that either condition can be met for the object to be included in the query.

And Not specifies that the first condition must be met and the second condition must not be met for the object to be included in the query.

Or Not specifies that either the first conditions can be met or the second condition cannot be met for the object to be included in the query.

Location

Display the Location Condition dialog box, where you can define a condition based on the location of the object in relation to points you specify.

For example, search for all objects that fall inside a circle or that cross a line.

Property

Display the Property Condition dialog box, where you can define a condition based on the object's properties.

For example, search for all objects on a specified layer, all objects of a certain color, or all text in a certain text style.

Data

Display the Data Condition dialog box, where you can define a condition based on object data attached to an object.

For example, if you attach a field named Pipe Diameter to several objects, you can search for all objects where that field has a value of 10" or more.

For more information on defining and attaching data, see To Create an Object Data Table.

SQL

Display the SQL Condition dialog box, where you can define a condition based on the external data linked to an object.

For example, if you are trying to determine the best location for a new park and you have linked data from a table containing information about the households, you can search for all parcels where the household has young children.

Note: Before you execute a query with a SQL condition, be sure the appropriate data source is attached and connected.

Query mode

Specify the type of query to run. If you are creating an element for the Display Manager, Draw is the only available option.

Preview

Preview the objects that match the query conditions, but don't actually pull the objects into the current drawing.

When you redraw the screen, the objects will be gone. Property alterations do not appear in a Preview mode query.

Draw

Get the objects that match the query and bring them into the current drawing. If you are creating an element for the Display Manager, this option gets the objects and adds them to the element.

If a property alteration has been defined, objects are modified as they are copied into the current drawing.

You must have Draw Query privileges to perform a draw query. See To Add a New User.

Report

Execute the query and save the results in a report file.

To specify a template for the report, click Options to display the Output Report Options dialog box.

Property alterations are not reflected in the report.

Options

Display the Output Report Options dialog box, where you specify a template for the report. The Options button is available only if Report query mode is selected.

Note: For topology queries, the Options button is available with both Draw and Report query modes.

Options

Set property alterations, save the query to execute later, load a query you previously saved, redraw the screen, or set options.

If you are creating a element for a display map, not all of the options are available.

Alter Properties check box

Determines whether the query executes the property alteration. If this is not selected, property alterations are ignored when you execute the query.

Alter Properties button

Display the Set Property Alterations dialog box, where you specify how to modify objects that are found by the query.

Save

Display the Save Current Query dialog box, where you save the current query so you can run it later.

Load

Display the Load Query dialog box, where you load a query that you previously saved.

Redraw <

Redraw the screen to clear any previews.

Zoom Ext <

Display the Zoom Drawing Extents dialog box, where you select any active drawings in your drawing set. AutoCAD Map 3D toolset then zooms the screen to the extents of the selected drawings.

Drawings

Display the Define/Modify Drawing Set dialog box, where you can change which drawings are attached to the current drawing, and which drawings are active for queries.

More

Display the Query tab of the Autodesk Map Options dialog box, where you change query options such as whether searches are case sensitive and whether to preview text as an insertion point.