Historical Context & Motivation
As computer-aided design matured from simple 2D line-drawing tools into complex platforms managing thousands of objects across dozens of layers, the need for intelligent selection mechanisms became critical. Early AutoCAD releases required users to manually click individual objects or define cumbersome rectangular and crossing windows to build selection sets, an approach that scaled poorly as drawings grew more complex. The Select Similar command emerged as part of Autodesk's broader strategy to introduce property-aware, context-sensitive selection tools that mirror the kind of query-based filtering familiar to computer scientists working with databases and structured data. Rather than selecting by geometry alone, Select Similar lets users specify an exemplar object and then gather all objects in the drawing that match a configurable set of properties—layer, color, linetype, object type, block name, and more.
The core question Select Similar addresses is fundamentally one of set-based retrieval: given an exemplar entity with a vector of properties, how do we efficiently identify all entities in the drawing database that match on a user-specified subset of those properties? This is analogous to a parameterized SQL WHERE clause running against AutoCAD's internal entity table, and understanding it in those terms will make the command's configuration options immediately intuitive.
Core Principles & Definitions
Select Similar operates on a straightforward but powerful paradigm: the user designates one or more seed objects, and AutoCAD queries its drawing database for all entities whose properties match the seed objects on every dimension enabled in the current SELECTSIMILARMODE bitmask. The result is a selection set containing every matching entity, ready for batch operations such as layer reassignment, property changes, deletion, or move/copy transformations. Understanding the following foundational ideas is essential before exploring the command's configuration.
Seed Object (Exemplar)
SELECTSIMILARMODE Bitmask
0 for a dimension means it is ignored; setting it to 1 means it is enforced.Object Type Matching
Selection Set Composition
Settings Dialog Access
SELECTSIMILAR with nothing pre-selected opens the Settings dialog, where users can toggle each property dimension via checkboxes rather than computing the bitmask manually.SELECT * FROM entities WHERE layer = 'Walls' AND type = 'LINE' in SQL, Select Similar lets you point at a line on the Walls layer and AutoCAD composes the equivalent query behind the scenes. The SELECTSIMILARMODE bitmask is effectively the WHERE clause—it determines which columns participate in the filter.Visual Explanation — Select Similar Workflow
The diagram above illustrates the critical distinction: Select Similar is not a geometric proximity query—it is a property-predicate filter that operates over the entire drawing database (or the current layout/model space). The seed object's properties are extracted and compared against every other entity of the same type in the drawing. The SELECTSIMILARMODE bitmask determines exactly which properties must match, giving users fine-grained control over selectivity. In algorithmic terms, this is a linear scan with a constant-time per-entity comparison whose cost is bounded by the total entity count in the drawing, making it O(n) where n is the number of entities sharing the seed's object type.
The SELECTSIMILARMODE Bitmask — How It Works
The behavior of Select Similar is entirely governed by the system variable SELECTSIMILARMODE, an integer whose binary representation encodes which property dimensions participate in the filter. Each bit position corresponds to a specific property, and because the bits are independent, multiple properties can be combined by summing their individual bit values—exactly the same way Unix file permissions use octal flags. The bitmask approach is space-efficient (a single 32-bit integer encodes all possible combinations) and computationally cheap (property matching reduces to bitwise AND operations against each entity's property vector).
Layer (1) and Color (2) yields SELECTSIMILARMODE = 1 + 2 = 3. The default value is 130 (Name + Style).| Bit Position | Decimal Value | Property Dimension | Example Match Criterion |
|---|---|---|---|
0 | 1 | Layer | Both entities on layer "Walls" |
1 | 2 | Color | Both entities with color index 5 (blue) |
2 | 4 | Linetype | Both entities using "DASHED" linetype |
3 | 8 | Linetype Scale | Both entities with linetype scale = 1.0 |
4 | 16 | Lineweight | Both entities with lineweight 0.30 mm |
5 | 32 | Plot Style | Both entities with same named plot style |
6 | 64 | Object Style | Both TEXT entities with style "Standard" |
7 | 128 | Name (Block Name) | Both INSERT refs with name "Door-Single" |
SELECTSIMILARMODE & (1 << bit_position) != 0. This is the same bitwise AND pattern used in Unix permissions (e.g., chmod 755), TCP flags, and graphics API state masks. If you are comfortable with bit manipulation in C or Python, the SELECTSIMILARMODE integer is immediately transparent.Property Dimensions & Classification of Match Types
Not all property dimensions are equally useful in every drawing context. Understanding which dimensions to enable—and why—requires classifying properties by their semantic role in a drawing's organizational hierarchy. We can group the eight property dimensions into three functional categories: organizational properties (Layer, Name) that control logical grouping, visual properties (Color, Linetype, Lineweight, Linetype Scale) that control appearance, and output properties (Plot Style, Object Style) that control how entities render in print or display contexts. Choosing the right combination determines whether your selection set is too broad (capturing unintended entities) or too narrow (missing desired ones).
When setting SELECTSIMILARMODE, think carefully about the granularity you need. A value of 1 (Layer only) is broad—it captures every entity of the same type on a given layer regardless of visual attributes. A value of 7 (Layer + Color + Linetype) is much more restrictive, useful when your drawing uses per-entity overrides rather than ByLayer assignments. The maximum possible value, 255 (all bits set), enforces exact property matching across every dimension, effectively finding only near-duplicates of the seed entity. In practice, most professionals work with values between 1 and 131, depending on whether their CAD standards are layer-centric or property-centric.
Worked Example — Reassigning Block References to a New Layer
Consider a floor plan drawing containing 47 door block references (INSERT entities with block name "Door-Single-36") scattered across three layers: "A-Door", "0", and "Misc". Your task is to move all of them to the correct layer "A-Door" using Select Similar. This mirrors a common standards-compliance cleanup scenario in architectural CAD workflows.
SELECTSIMILARMODE and press Enter. We want to match only on Name (block name), which is bit 7, decimal value 128. Set the variable to 128. This ensures that layer, color, and other properties are ignored—we want all Door-Single-36 references regardless of which layer they currently reside on.SELECTSIMILARMODE = 128SELECTSIMILAR at the command line and press Enter. AutoCAD scans the entire drawing for INSERT entities whose block name equals "Door-Single-36". Because SELECTSIMILARMODE is set to 128 (Name only), layer differences are ignored.A-Door. All 47 block references are moved to the correct layer simultaneously.QSELECT or the Layer Manager to confirm that no Door-Single-36 references remain on layer 0 or Misc. If your next task requires a different filter profile, reset SELECTSIMILARMODE to its default (130) or to your preferred working value.Select Similar vs. Alternative Selection Methods
AutoCAD provides several mechanisms for building selection sets, each optimized for different use cases. Select Similar occupies a unique niche as a fast, exemplar-based selection tool that requires minimal user input, but understanding its trade-offs relative to other approaches is essential for choosing the right tool in any given scenario.
| Method | Strengths | Limitations | Best Use Case |
|---|---|---|---|
| Select Similar | Fast, exemplar-driven, no dialog interaction needed. Configurable via bitmask. Accessible from right-click context menu. | Cannot filter by geometric properties (length, radius, area). Cannot use inequality operators (>, <, ≠). Scope is always the entire drawing. | Quick selection of all entities matching a known exemplar; bulk property changes. |
| Quick Select (QSELECT) | Full property filtering with comparison operators (=, ≠, >, <, wildcard). Can scope to existing selection set. Supports geometric properties. | Requires dialog interaction with multiple dropdowns. Slower for simple tasks. User must know exact property values. | Complex queries: "all circles with radius > 5.0 on layer X." |
| Selection Filters (FILTER) | Supports Boolean logic (AND, OR, NOT, XOR). Filters can be saved and reused. DXF-level property access. | Complex interface; steep learning curve. Requires knowledge of DXF group codes. Legacy dialog design. | Reusable, complex Boolean queries for automated workflows or LISP routines. |
| Window / Crossing | Spatial selection—fastest for localized edits. No configuration needed. Intuitive for all skill levels. | Property-blind: captures everything in the region regardless of layer, type, or color. Impractical for scattered objects. | Localized editing where all visible objects in a region should be selected. |
Connection to Scripting, LISP, and Advanced Workflows
For computer science students, the real power of Select Similar becomes apparent when it is integrated into automated workflows via AutoLISP, .NET (C#), or Python (via pyautocad). The SELECTSIMILAR command itself can be invoked programmatically, and the SELECTSIMILARMODE variable can be set dynamically before execution, enabling scripts that perform context-aware batch operations across large drawing sets. Understanding how Select Similar relates to its more programmatic counterparts is essential for building scalable CAD automation pipelines.
| Feature | Select Similar (Interactive) | Programmatic Selection (LISP/.NET) |
|---|---|---|
| Invocation | Right-click menu or command line | (ssget "X" '((0 . "LINE")(8 . "Walls"))) |
| Filter specification | SELECTSIMILARMODE bitmask | DXF group code association lists or .NET SelectionFilter |
| Boolean operators | Implicit AND only | Full Boolean logic (AND, OR, NOT, XOR) |
| Comparison operators | Equality only (=) | Full set: =, ≠, <, >, ≤, ≥, wildcards |
| Learning curve | Minimal—intuitive point-and-click | Moderate to high—requires DXF knowledge |
| Automation potential | Limited (requires user seed selection) | Full automation—no user interaction needed |
(ssget "X" (list (cons 0 (cdr (assoc 0 (entget (car (entsel)))))) (cons 8 (cdr (assoc 8 (entget (car (entsel)))))))). This prompts the user to select an entity, extracts its type (DXF group 0) and layer (DXF group 8), then builds a selection set of all entities matching both. The pattern is functionally identical to Select Similar with SELECTSIMILARMODE = 1, but gives you full programmatic control over post-selection actions.As you progress into CAD automation and BIM integration, Select Similar serves as a conceptual stepping stone toward more powerful selection paradigms. In environments like Revit (which uses element-level filtering with parameter queries) or industry data standards like IFC (where entities carry rich semantic metadata), the same exemplar-based selection philosophy appears in more sophisticated forms. Mastering Select Similar now builds the mental model for understanding property-driven selection and filtering in any data-rich design environment.
Practice Problems
Select Similar — Summary
The Select Similar command provides an exemplar-based, query-by-example selection mechanism in AutoCAD. By selecting one or more seed objects and invoking the command (via right-click menu or command line), AutoCAD scans the entire drawing for entities of the same object type whose properties match the seed on every dimension enabled in the SELECTSIMILARMODE bitmask. This bitmask uses powers of two to encode eight property dimensions—Layer (1), Color (2), Linetype (4), Linetype Scale (8), Lineweight (16), Plot Style (32), Object Style (64), and Name (128)—that can be combined additively to create precise filter profiles.
Compared to Quick Select (QSELECT) and Selection Filters (FILTER), Select Similar trades expressiveness (no inequality operators, no Boolean composition) for speed and minimal cognitive overhead—making it the ideal tool for fast, repetitive selection tasks in layer management, standards compliance, and bulk property editing. For programmatic workflows, the same property-predicate filtering logic can be replicated in AutoLISP or .NET with full Boolean and comparison operator support, positioning Select Similar as a conceptual gateway to automated CAD data querying.