Two parts to the zoom to title block in layouts, I would find the title block in the layout and force a move of all objects so title block is at 0,0 for other programs like our "Autoplot". So using same code can use Zoom "W" window by getting the "Bounding Box' of the title block.
This is the move part have a go at adding the zoom window. In our case the title block is known and at 1:1 true size so can do a zoom window -20,-20 then 821,574
; moves all objects in pspace to 0,0 alignment based on selected title block.
; By AlanH updated Oct 2025
(defun movelayouts ( / oldsnap plottablist xy)
(setq oldsnap (getvar "osmode"))
(setvar "osmode" 0)
(setq plottablist (layoutlist))
(setvar 'ctab (nth 0 plottablist ))
(setq ent (entget (car (entsel "Pick Title Block:"))))
(setq bname (cdr (assoc 2 ent)))
(foreach tname plottablist
(setvar "ctab" tname)
(setq ss (ssget "X" (list (cons 0 "INSERT")(cons 2 bname)(cons 410 tname))))
(setq xy (cdr (assoc 10 (entget (ssname ss 0)))))
(command "move" "w" (getvar "extmax") (getvar "extmin") "" xy "0,0")
(command "zoom" "E") ; replace here zoom window
)
(setvar "osmode" oldsnap)
(princ)
)
(movelayouts)