Creating and Applying Filters for Entity Selection
Use the SelectionFilter command to filter entities for selection.
You can
- Create complex selection filters, using relational and logical operators.
- Apply selection filters transparently during the execution of modification commands.
- Save and apply named filters.
After you select entities based on the filter, modify the entities using the modification commands or the Properties palette.
Note: The command does not create a selection set. It defines criteria to apply on a selection set.
To create and apply selection filters:
- Type SelectionFilter at the command prompt.
- In the dialog box, in Filter type, select an entity type, an entity type with property, or a property.
- If you selected an entity with property:
In the dialog box:
- Specify a relational operator (*, =, !=, >, >=, <, or <=).
- Specify a value.
- Click OK.
- Click Add
to add the the item to the filter list.
- In Operator, set a logical operator (AND, OR, NOT, or XOR) if needed.
Use logical operators to group filter expressions.
- If you selected a logical operator, click Add
to add the operator to the filter list.
- Use options as needed:
- Repeat steps 2 to 7 as needed.
- Click OK.
The selection filter is now active.
Note: At this point no selection set is created. Unlike the SmartSelect command, it defines criteria to apply on a selection set. It is important to continue with the next step.
- In the graphics area, specify the entities to which you want to apply the selection filter.
You can use any of the entity selection methods.
- Press Enter to conclude entity selection.
- Run a modification command.
The command uses the preselection (step 10). It does not prompt to specify entities.
To reapply selection filters with the next modification command:
- Run a modification command.
- Specify the Previous option at the next Specify entities prompt.
Using selection filters transparently
You can apply selection filters as transparent command by typing 'SelectionFilter at the "Specify entities" prompt of modification commands.
To use selection filters transparently:
- Invoke a command to modify drawing entities (for example, Copy).
- At the "Specify entities" prompt, type 'SelectionFilter.
- In the Selection Filter dialog box, define a new filter or select an existing named filters.
- Click OK.
- In the graphics area, specify the entities to which you want to apply the selection filter and press Enter.
- Follow the prompts of the modification command.
Working with named selection filters
You can save selection filters under a name and reapply the named filters.
Selection filters are stored in the user's profile, not in the drawing and you can apply them on your computer.
You can store several saved selection filters into a .flt file to use them on another computer or to exchange selection filters with your colleagues. See Exporting and Importing Named Selection Filters.
Note: Selection filters parameters that do not match property settings within the current drawing (such as Layer name specifications) are ignored when applying the filter.
To save named selection filters:
- In the Selection Filter dialog box, define a selection filter as described above.
- Type a name for the filter in the text box next to the Save button and click Save.
The selection filter name appears in the Named filter, select a saved filter.
To apply saved selection filters:
- Type SelectionFilter at the command prompt.
- In Named filter, select the name of the selection filter to apply.
- Click OK.
- Invoke a modification command.
- In the graphics area, specify the entities to which you want to apply the selection filter.
To delete named selection filters:
- In the Selection Filter dialog box, in Named filter, select a filter to delete and click Delete
.
Exporting and Importing Named Selection Filters
You can use FLT files to exchange named selection filters with your colleagues.
Use export and import features from the Selection Filter dialog box to:
- Save specified named selection filters to a .flt file.
- Import specified named selection filters from a .flt file.
To export named selection filters:
- Type SelectionFilter at the command prompt.
- In the Selection Filter dialog box, click Export.
- Type the file name for the .flt file.
- Click Save.
- In the Selection Filter - Export dialog box, select the named filters to export.
Click Clear all to cancel the selections or Select all to select all named filters.
- Click OK.
To import selection filter files:
- Type SelectionFilter at the command prompt.
- In the Selection Filter dialog box, click Import.
- Select the .flt file and click Open.
The Selection Filter - Import dialog box displays the named filters available in the selected .flt file.
- In the Selection Filter - Import dialog box, select the named filters to import.
Click Clear all to cancel the selections or Select all to select all named filters.
- Click OK.
All selected named filters apear in the Named filter list, in the Selection Filter dialog box.
Note: Selection filters from the .flt file that have the same name as exiting filters on your computer are not imported.
Operators Overview
Relational Operators
Operator |
Description |
Examples |
* |
Equal to any value |
All Circles without any restriction |
= |
Equal |
All Circles with radius=2.54 |
!= |
Unequal |
All Circles with radius other than 2.54 |
> |
Greater than |
All Circles with radius greater than 2.54 |
>= |
Greater than or equal to |
All Circles with radius greater than or equal to 2.54 |
< |
Lower than |
All Circles with radius less than 2.54 |
<= |
Lower than or equal to |
All Circles with radius less than or equal to 2.54 |
Logical Operators
Operator |
Description |
Examples |
AND |
Filter items that meet all criteria (can enclose one or more criteria) |
All Circles on Layer "Screws" |
OR |
Filter items that meet any of the criteria (can enclose one or more criteria) |
All Circles and all entities on Layer "Screws" |
NOT |
Filter items that do not meet the criteria (must enclose only one criterion) |
All entities on Layer "Screws" that are not Circles (if applied to the Circle entity type criterion) |
XOR |
Filter items that meet one or the other criteria, but not both (must enclose two criteria) |
All Circles not on Layer "Screws" and all entities on Layer "Screws" that are not Circles |
Examples
The following examples show the filter list contents.
All Circles with a radius greater than 2.54 drawing units:
AND
Circle
Radius > 2.54
All Circles and all entities on Layer "Screws":
OR
Circle
Layer "Screws"
Command: SelectionFilter