Default UI Menu: Edit/Select by/Query
Ribbon UI Menu:
Selects objects meeting a complex set of criteria. For example, you can select all blue arcs or yellow dashed curves on Layers 3 and 5. Query selection can be useful in large or complicated drawings in which you need to filter through numerous colors, layers, entity types, etc. You can write a query manually in the edit box, if you know the syntax rules. But it is recommended to use the tools in the Selection by Query window.
Note: Query will not select individual objects that are members of groups or blocks.
Query window: Contains the expression used to filter the objects for selection. You can assemble the expressions via the Criteria button, or you can enter them manually.
Note: The query text does not automatically wrap. Press Enter to separate lines. Also, new criteria are inserted at the end of the expression, regardless of cursor position. You can cut and past text to correct the order.
And: Selects objects meeting all criteria. Or: Selects objects meeting any criteria. Not: Selects objects that do not meet the specified criteria. Parenthesis: Used for grouping elements of the expression. Clear: Erases the current expression. Parse Query: Tests the syntax of the query expression. If there is an error in logic or format, an error message will appear. You will also be notified if the query is sound.
Note: Parse Query only tests the logic of the query expression. It does not test whether objects will be selected, nor does it implement the query.
The main elements of a query are names of object properties, values of properties, and logical operations. Click the Criteria button to start your query.
All: Runs the query on all objects in the file. Selection: Runs the query only on selected objects. Common Properties: Enables you to select from a list of commonly-used properties. For example, you can select objects that have certain brush colors, line widths, layers, etc.
For example, If you click Brush Color, the Choose Values window will have the list of all brush colors. Check all the colors you want to include in the query. At the bottom of the window, you can choose Any to select all objects with these colors. If you choose None, objects that have other colors will be selected.
This is how the brush color query looks in the Selection by Query window.
Note: Some properties do not have specific values or a list of choices.
Object Properties: Enables you to select objects that have certain physical properties such as length or radius. For example, arcs and circles can be selected by arc length, circumference, radius, etc. Click Radius.
Enter a Value and its Relative (equal, less than, greater or equal, etc.). In this example, the query will select arcs and circles with radii between 3 and 5 inches, or equal to 10 inches.
This is how the radius value query looks in the Selection by Query window.
Custom Properties: See [Custom Properties, Database, and Reports.
Favorite Properties: Enables you to choose from a list of queries you use often. You can add common properties and object properties to the list of favorites.
For example, open the Common Properties, and right-click on Brush Color. Select Add to Favorites.
Then open the Common Properties, and right-click on Height under Box. Select Add to Favorites.
To see where these favorites are listed, open Favorite Properties.
The brush color and height properties are listed here.
To remove a property from the favorites list, right-click on it and select Remove.
Saving and Loading a Query
If you want to use a query later, you can save it. Click Save Query.
Enter a name for the query and click Save.
Then in the Selection by Query window, find the query name in the List.
To change saved queries, click Edit List.