Expand WelcomeWelcome
Expand The User InterfaceThe User Interface
Expand Getting StartedGetting Started
Expand Drawing with PrecisionDrawing with Precision
Expand Working with Drawing FilesWorking with Drawing Files
Expand Viewing the DrawingViewing the Drawing
Expand 3D Viewing and Presentation3D Viewing and Presentation
Expand Formatting the DrawingFormatting the Drawing
Expand Drawing EntitiesDrawing Entities
Collapse Modifying EntitiesModifying Entities
Expand Working with Blocks, BlockAttributes, EntityGroups, and ReferencesWorking with Blocks, BlockAttributes, EntityGroups, and References
Expand Working with Hatches, Color Fills, Text, and TablesWorking with Hatches, Color Fills, Text, and Tables
Expand Creating and Modifying DimensionsCreating and Modifying Dimensions
Expand Creating and Modifying 3D EntitiesCreating and Modifying 3D Entities
Expand Creating Layout Sheets and Printing DrawingsCreating Layout Sheets and Printing Drawings
Expand Arranging Drawing WindowsArranging Drawing Windows
Expand CustomizingCustomizing
Expand Command ReferenceCommand Reference
Expand Add-InsAdd-Ins
Expand DraftSight ProfessionalDraftSight Professional
Expand DraftSight PremiumDraftSight Premium
Expand DraftSight MechanicalDraftSight Mechanical
Hide Table of Contents

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:

  1. Type SelectionFilter at the command prompt.
  2. In the dialog box, in Filter type, select an entity type, an entity type with property, or a property.
  3. If you selected an entity with property:

    In the dialog box:

    1. Specify a relational operator (*, =, !=, >, >=, <, or <=).
    2. Specify a value.
    3. Click OK.
  4. Click Add  to add the the item to the filter list.
  5. In Operator, set a logical operator (AND, OR, NOT, or XOR) if needed.

    Use logical operators to group filter expressions.

  6. If you selected a logical operator, click Add  to add the operator to the filter list.
  7. Use options as needed:
    • Click Add Entity  and click in the graphics area to add an entity to the selection filter.

      The dialog box closes temporarily until you select a drawing entity to add to the filter list.

    • Click Delete  to selectively remove filter list items.
    • Click Clear List  to clear the selection filter list.
  8. Repeat steps 2 to 7 as needed.
  9. 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.

  10. 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.

  11. Press Enter to conclude entity selection.
  12. 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:

  1. Run a modification command.
  2. 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:

  1. Invoke a command to modify drawing entities (for example, Copy).
  2. At the "Specify entities" prompt, type 'SelectionFilter.
  3. In the Selection Filter dialog box, define a new filter or select an existing named filters.
  4. Click OK.
  5. In the graphics area, specify the entities to which you want to apply the selection filter and press Enter.
  6. 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:

  1. In the Selection Filter dialog box, define a selection filter as described above.
  2. 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:

  1. Type SelectionFilter at the command prompt.
  2. In Named filter, select the name of the selection filter to apply.
  3. Click OK.
  4. Invoke a modification command.
  5. 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:

  1. Type SelectionFilter at the command prompt.
  2. In the Selection Filter dialog box, click Export.
  3. Type the file name for the .flt file.
  4. Click Save.
  5. 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.

  6. Click OK.

To import selection filter files:

  1. Type SelectionFilter at the command prompt.
  2. In the Selection Filter dialog box, click Import.
  3. Select the .flt file and click Open.

    The Selection Filter - Import dialog box displays the named filters available in the selected .flt file.

  4. 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.

  5. 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"

Access

Command: SelectionFilter



Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   Creating and Applying Filters for Entity Selection
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:

x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: 2023 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.