这是一个lisp,用于打印模型空间中的所有标题栏。您需要更改标题栏名称和一些大小值,以适应需要。您需要更改目标打印机名称和Ctb名称。
- ; plot all title blocks in model space
- ; By Alan H
- (PROMPT ".....PRINTING DRAWING TO plotter....")
- (setq oldsnap (getvar "osmode"))
- (setvar "osmode" 0)
- : Da1drsht is titel block name
- (setq ss2 (ssget "x" '((0 . "INSERT")(2 . "Da1drsht")(410 . "Model"))))
- (setq n (sslength ss2))
- (setq index 0)
- (repeat n
- (setq en (ssname ss2 index))
- (setq el (entget en))
- (setq inspt (assoc 10 el)) ; insertion pt this is lower left for this code
- (setq xmin (- (cadr inspt) 6.0))
- (setq ymin (- (caddr inspt) 6.0))
- (setq xymin (strcat (rtos xmin 2 1) "," (rtos ymin 2 1)))
- (setq xmax (+ xmin 813.0)) ; hard coded for 813 wide 6mm offset
- (setq ymax (+ ymin 566.0)) ;hard code for 566 high
- (setq xymax (strcat (rtos xmax 2 1) "," (rtos ymax 2 1)))
- (COMMAND "-PLOT" "Y" "" "//PRODPRN01/Design-5100"
- "A3" "M" "LANDSCAPE" "N"
- "W" xymin xymax "1=2" "C"
- "y" "Designlaser.ctb" "Y" "" "n" "n"
- "y"
- )
-
- (setq index (+ index 1))
- )
- (setvar "osmode" oldsnap)
- (princ)
|