RecipesEdit in bulk
How do I fill in the title block on every layout at once in AutoCAD?
Type "On every layout set the title block's PROJECT to Villa Meier, DRAWN to RK, DATE to today, and number the sheets 1 of N". cadssistant lists the layouts, finds the title block on each one by its block name, reads today's date from AutoCAD, and writes PROJECT, DRAWN and DATE into every title block in one pass, with SHEET set to 1 of 3, 2 of 3 and 3 of 3 in layout order. You don't open each layout or pick anything. The reply lists every layout with the sheet number it got. Revert in the chat puts the old values back. By hand, it's the Enhanced Attribute Editor on each layout in turn, or ATTOUT and ATTIN through a text file.
Checked 2026-10-30 · one of the tasks cadssistant's models are benchmarked on
On every layout set the title block's PROJECT to Villa Meier, DRAWN to RK, DATE to today, and number the sheets 1 of N
What cadssistant does
- Lists the drawing's layouts and finds the title block on each: the block reference on that layout carrying the PROJECT, DRAWN, DATE and SHEET tags. Blocks in model space are left alone.
- Reads today's date through AutoCAD, so DATE is the real date, not a guess.
- Writes the values into all the title blocks at once: the same PROJECT, DRAWN and DATE on each, and SHEET as 1 of 3, 2 of 3, 3 of 3 in the order the layouts are listed.
- Replies with each layout and the sheet number it got, so a wrong order is easy to spot.
The same task in AutoLISP
(progn
(vl-load-com)
(setq lts (vla-get-Layouts (vla-get-ActiveDocument (vlax-get-acad-object)))
lays (vl-sort (layoutlist)
'(lambda (a b) (< (vla-get-TabOrder (vla-item lts a)) (vla-get-TabOrder (vla-item lts b)))))
sheets nil)
(foreach lay lays
(if (setq ss (ssget "_X" (list '(0 . "INSERT") '(2 . "TBLOCK") (cons 410 lay))))
(setq sheets (cons (ssname ss 0) sheets))))
(setq sheets (reverse sheets) n 0
today (menucmd "M=$(edtime,$(getvar,date),DD.MO.YYYY)"))
(foreach e sheets
(setq n (1+ n))
(foreach a (vlax-invoke (vlax-ename->vla-object e) 'GetAttributes)
(setq tag (vla-get-TagString a))
(cond ((= tag "PROJECT") (vla-put-TextString a "Villa Meier"))
((= tag "DRAWN") (vla-put-TextString a "RK"))
((= tag "DATE") (vla-put-TextString a today))
((= tag "SHEET") (vla-put-TextString a (strcat (itoa n) " of " (itoa (length sheets))))))))
n)Change TBLOCK to your title block's name. Takes the layouts in tab order, skips any without a TBLOCK, and returns how many sheets it filled. In the date format, MO is the month and MM would be minutes.
Good to know
- Sheets are numbered in the order the drawing lists its layouts, which can differ from the tab order if tabs were dragged around. The reply shows which layout got which number; say the order you want if it's off.
- Any title block works: its tags are read from the block, so name them as they appear (PROJ_NAME, CHECKED, REV and so on).
More in edit in bulk
Command: CADSSISTANT
Works in AutoCAD 2024 and newer on Windows. Free trial, no card, no API key.
Get cadssistant