Selecting objects using normal AutoCAD selection techniques is fairly simple, but for very large drawing files the selection may often become a tedious and error-prone task. Selection filter in AutoCAD can ease this process allowing you create selections quickly.
Although you can use “natural” filters like Layers and Quickselect but when you require even more specific tool then Object selection filter can be used which can ease your filtering task to a great extent.
This tip is especially useful if you don’t have LISP routine for creating complex selections, you can create this filter and save it for future use without ever requiring LISP.
To explain this feature I will use a sample drawing containing four layers Layer 0, layer 1, layer 2 and layer 3. Circles of radius 1 and 2 units on different layers and Rectangles on different layers. You can download the drawing here.
Making a filter that selects all circles of layer 1 with radius 2 units.
Type FILTER in the command line and press enter, the Object Selection Filters window will appear. Now select Layer from Select Filter drop-down menu.
The Select button, next to drop down menu will get highlighted. Click on the Select button and pick layer 1 from it. Click on Add to List button to add this filter criterion to our filter box, now we need to add other criteria of the radius.
Select circle radius from Select filter drop-down menu. You will notice that drop-down menu next to X gets highlighted and you can select operators from them like greater than, less than equal etc. In this case, we want to select circle with radius equal to 2 hence select Equal operator.
Enter the value of radius ie 2 in the box next to operator drop-down menu and click on add to list button again.
Now click apply then select entire drawing and press enter you will notice that only objects which meet these criteria are selected.
At the end of Select Filter drop-down menu you will find grouping operators **begin AND, ** end AND, ** begin OR, **end OR and also some other operators like XOR and NOT these operators are used to make complex selections in AutoCAD objects.
These operators are always used in pairs where each begin operator must end with its equivalent end operator as shown below.
**begin AND DATA 1 DATA 2 **end AND
In the above example if you use AND operator then the filter will be created if both the criteria of DATA 1 and DATA 2 match, if OR operator is used then the filter will include objects that fall in either of the criteria.
In the next example, I will make another filter using these grouping operators.
Making a filter that selects all circles on layer 2 with radius two unit and all rectangles of layer 3.
Add the following operators in the same order as listed below using the Select Filter drop-down menu.
**Begin OR **Begin AND Layer = Layer 2 Object = Circle **End AND **Begin AND Object = Circle Circle radius = 2.00 **End AND **Begin AND Layer = Layer 3 Object = Polyline **End AND **End OR
Now in this list of operators, you will notice that it starts and ends with OR operator (marked red) and in between, we have three criteria. All the inner criteria start and end with AND operator.
The first criteria marked with green color will include all the circles on layer 2. The second criteria marked with blue color will include all the circles with radius 2. The third criteria marked with black color will include all rectangles of layer 3 as the only polyline in the geometry is the rectangle.
Final filter will comprise of all these criteria because we have used OR operator to open and close this filter list. All objects meeting any of the three criteria will get selected and our final selection will look like this.
Saving object filters
After making so much effort in creating this filter you would definitely like to save it for future use. To save this filter enter the name in the blank box next to save as in the named filter panel of Object selection filter window and click on Save As, the filter will be saved in the current drawing.
Do you have questions related to this tool? Let me know in the comments below.