RecipesEdit in bulk

How do I replace one block with another throughout an AutoCAD drawing?

Type "replace every CHAIR-OLD block with CHAIR-NEW, keep position, rotation and scale". If CHAIR-NEW is already defined in the drawing, cadssistant rewrites the block name on every CHAIR-OLD reference in one AutoLISP pass, so each one keeps its insertion point, rotation, scale and layer, then regenerates and reports the count. If CHAIR-NEW isn't in the drawing yet it says so and asks where to insert it from. Revert in the chat swaps them back.

Checked 2026-10-30

What you typeCommand: CADSSISTANT

replace every CHAIR-OLD block with CHAIR-NEW, keep position, rotation and scale

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

What cadssistant does

  1. Checks the block table: both names must exist. If the new one is missing it asks where to insert it from, or you insert one copy first.
  2. Selects every INSERT named CHAIR-OLD and rewrites the block name to CHAIR-NEW in one AutoLISP pass, which keeps every other property of the reference.
  3. Replies with the count. Say "purge CHAIR-OLD" afterwards to drop the old definition once nothing references it.

The same task in AutoLISP

(progn
  (setq ss (ssget "_X" '((0 . "INSERT") (2 . "CHAIR-OLD"))) i 0)
  (if ss
    (repeat (sslength ss)
      (setq ed (entget (ssname ss i)) i (1+ i))
      (entmod (subst (cons 2 "CHAIR-NEW") (assoc 2 ed) ed))))
  (if ss (sslength ss) 0))

CHAIR-NEW must already be defined in the drawing. Attributes stay as they were, so a new block with different attribute tags needs ATTSYNC afterwards.

Good to know

  • The base points of the two blocks must agree, or every copy shifts by the difference. Say "check the base points" and it compares the two definitions before swapping.

More in edit in bulk

Command: CADSSISTANT

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

Get cadssistant