这可以为模型或布局选项卡更改,并使用多个块作为位置在无打印图层上创建块图纸尺寸使用阵列等进行创建。
- ; printing multiple sheets in model space automatically
- ; by Bigal 2011
- (PROMPT ".....PRINTING DRAWING TO plotter....")
- (setq oldsnap (getvar "osmode"))
- (setvar "osmode" 0)
- (setq ss2 (ssget "x" '((0 . "INSERT")(2 . "Your blockname here")(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
- (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" "" "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)
|