Some bits you need to change are shown in red, copy and paste my 1st post to Notepad save as "Plot-Multi-Mspace.lsp". make changes to the code as shown below, post a dwg with say two title blocks a RAR is a nuisance for me then could change code for you.
To run type Appload and pick the lisp Load & close it should run.
- ; plot multi title block in Model space ; By Alan H 2013(PROMPT ".....PRINTING DRAWING TO plotter....")(setq oldsnap (getvar "osmode"))(setvar "osmode" 0)(setq ss2 (ssget "x" '((0 . "INSERT")(2 . [color=red]"Da1drsht[/color]")))) ;[color=red] title block name[/color](setq n (sslength ss2))(setq index 0)(repeat n (setq en (ssname ss2 index)) (setq el (entget en)) (setq inspt (assoc 10 el)) ;[color=mediumturquoise] insertion pt of title block[/color] (setq xmin (- (cadr inspt) [color=red]6.0[/color])) ; [color=red]offset pt lower left[/color] (setq ymin (- (caddr inspt)[color=red] 6.0[/color])) (setq xymin (strcat (rtos xmin 2 1) "," (rtos ymin 2 1))) (setq xmax (+ xmin 813.0)) ; [color=red]hard coded for 813 wide 6mm offset[/color] (setq ymax (+ ymin 566.0)) ;[color=red]hard code for 566 high[/color] (setq xymax (strcat (rtos xmax 2 1) "," (rtos ymax 2 1)))[color=red]; scale 1=2 is for an A1 sheet plotted on A3 paper[/color][color=#ff0000]; dwg to pdf means we can check if it works rather than waste paper[/color] (COMMAND "-PLOT" "Y" "" [color=red]"DWG to PDF[/color][color=red]"[/color] "A3" "M" "LANDSCAPE" "N" "W" xymin xymax [color=red]"1=2"[/color] "C" "y" [color=red]"Designlaser.ctb[/color]" "Y" "" "n" "n" "y" "N" "N" "Y" ) (setq index (+ index 1)))(setvar "osmode" oldsnap)(princ)
|