RecipesCount and measure

How do I count all the circles in an AutoCAD drawing?

Type "how many circles are in this drawing?" in the cadssistant palette. It runs one AutoLISP selection filter over the drawing, reads the count back and answers with the number; nothing is changed. Say "on layer HOLES" to narrow it to a layer, or "among the selected objects" and it counts inside your grip selection instead. Without an assistant, the same count is one expression at the command line, shown below.

Checked 2026-10-30 · one of the tasks cadssistant's models are benchmarked on

What you typeCommand: CADSSISTANT

how many circles are in this drawing?

Paste it into the palette, or pick it from the recipes inside the chat.

What cadssistant does

  1. Selects every CIRCLE in the drawing with a filter and counts the selection, in one AutoLISP pass.
  2. Reads the value back into the chat and answers with the count. A read-only question runs no editing command.
  3. Say "among the selected objects" and it takes your grip selection (no prompt, you already selected them) and counts the circles in it instead of the whole drawing.

The same task in AutoLISP

(if (setq ss (ssget "_X" '((0 . "CIRCLE"))))
  (sslength ss)
  0)

The same count at the command line. ssget returns nil, not an empty set, when nothing matches, hence the guard.

Good to know

  • Add a layer to the sentence ("on layer HOLES") and the filter gains (8 . "HOLES").
  • ssget "_X" sees the whole database: circles on frozen and off layers count, and so do circles in paper space layouts. Add (410 . "Model") to keep to model space.
  • Circles inside block definitions don't count: the filter sees the INSERT, not what's in it.

More in count and measure

Command: CADSSISTANT

Works in AutoCAD 2024 and newer on Windows. Free trial, no card, no API key.

Get cadssistant