CADLisp Tools

Selection

(ssget)

Create a selection set interactively or from a filter.

What it does

ssget gathers entities into a selection set. With no arguments, it lets the user select objects using the normal CAD selection interface.

Simple example

(setq selection (ssget))

Practical CAD example

Limit an interactive selection to text objects:

(setq text-set (ssget '((0 . "TEXT,MTEXT"))))

Common mistakes

  • Calling sslength before checking whether ssget returned nil.
  • Using _X without understanding that it can scan the entire drawing database.
  • Building a filter with the wrong DXF group code.