马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
(defun c:mp(/ oldosmode bomprint plotname plotter ctrl bomprint bomblockname minpoint maxpoint);print
(command "undo" "be")
(command "ucs" "w")
(setq oldosmode(getvar "osmode"))
(setvar "osmode" 0)
(setq bomprint (ssget '((2 . "NewDwgBox"))))
(setq plotname nil)
(setq plotname(getint "\nEnter Plotter Name[1:Samsung SCX-4x20 Series PCL 6/2:HP LaserJet 5100 PS]<1>:"))
(cond ;Select Printer
((or(= plotname 1)(= plotname nil))(setq plotter "\\\\SV\\Samsung SCX-4x20 Series PCL 6"))
((= plotname 2)(setq plotter "HP LaserJet 5100 PS"))
((= plotname 3)(setq plotter "HP LaserJet 5000 Series PCL"))
(t (alert "Please Select a Plotter Device!")(exit))
);end cond
(setq ctrl 0)
(while (< ctrl (sslength bomprint))
(setq bomblockname (ssname bomprint ctrl )
boxscale(cdr(assoc 41 (entget bomblockname)))
insp(cdr(assoc 10 (entget bomblockname))))
(setq minpoint (mapcar '- insp (mapcar '*(list 119 108 0)
(list boxscale boxscale boxscale)))
maxpoint (mapcar '+ insp (mapcar '*(list 179 103 0)
(list boxscale boxscale boxscale))))
;base on InsertPoint get corner for printing
(command "-plot" "y" "" plotter "A4(210 x 297 mm)" "m"
"l" "n" "w" minpoint maxpoint "f" "c" "y" "acad.ctb" "y" "n" "n" "n" "y")
(setq ctrl(1+ ctrl))
);end while
(princ (strcat "\n********** 共打印 " (itoa ctrl) " 张 **********\n"))
(setvar "osmode" oldosmode)
(command "undo" "e")
(princ)
)
广告位,后台可以设置,支持js
您好,您暂时不能浏览帖子的全部内容,请 登录
| 没有账号? 请 注册