RecipesEdit in bulk
How do I move all objects of one type to another layer in AutoCAD?
Type "move all text on layer 0 to layer A-ANNO". cadssistant checks the target layer exists (creating it with LAYER if not), selects every TEXT and MTEXT on layer 0 with one filter, rewrites the layer of each in a single AutoLISP pass, and replies with how many it moved. The same sentence works for "all dimensions to A-DIMS" or "everything red to layer DEMO". Revert in the chat puts them back.
Checked 2026-10-30
move all text on layer 0 to layer A-ANNO
Paste it into the palette, or pick it from the recipes inside the chat.
What cadssistant does
- Makes sure A-ANNO exists, creating it with -LAYER if the layer list doesn't have it, since an entity can't be moved to a layer that isn't there.
- Selects TEXT and MTEXT on layer 0 with one ssget filter.
- Rewrites the layer of each entity in one AutoLISP pass and replies with the count. Entities inside blocks are not touched.
The same task in AutoLISP
(progn
(setq ss (ssget "_X" '((0 . "TEXT,MTEXT") (8 . "0"))) i 0)
(if ss
(repeat (sslength ss)
(setq ed (entget (ssname ss i)) i (1+ i))
(entmod (subst (cons 8 "A-ANNO") (assoc 8 ed) ed))))
(if ss (sslength ss) 0))Create A-ANNO first with the LAYER command if it doesn't exist yet. Returns the number of entities moved.
Good to know
- "Everything red" means colour 1 by entity override: (62 . 1) in the filter. Objects that are red because their layer is red are BYLAYER and don't match; say "on red layers" for those.
- Say "and set them to BYLAYER" to also clear colour and linetype overrides in the same pass.
More in edit in bulk
Command: CADSSISTANT
Works in AutoCAD 2024 and newer on Windows. Free trial, no card, no API key.
Get cadssistant