怎么样给这个简易打印插件,设置默认开启打印戳记
本帖最后由 zm880928 于 2022-6-30 10:18 编辑(defun c:DY()
(setq snap (getvar "osmode"))
(setvar "osmode" 0)
(setvar "osmode" 1)
(setq PN "HP LaserJet 1020")
(setq zz "C")
(setq AS 1);打印的页数为1页
(setq VDI 100) ; 横向两页间距为100,可以一次打印多页,根据需求自己改吧
(setq P1 (getpoint "\n***第一角点: "))
(setq P2 (getcorner p1 "\n***第二角点: "))
(setq fx (if(>(apply '-(mapcar 'abs(mapcar '- p1 p2)))0)"L" "P"))
(setq sn 0)
(while (/= sn AS)
(setq PP (polar p1 0 (* VDI sn)))
(setq MP (polar p2 0 (* VDI sn)))
(setq sn (+ sn 1))
(command "-plot" "y" "model" PN "A4" "m" fx "n" "w" PP MP "f" zz "y" "monochrome.ctb" "y" "n" "n" "n" "y" )
)
(setvar"osmode" snap);恢复捕捉
(PRINC "\n 打印成功 !!!")
(PRINC)
) 本帖最后由 ludaweb 于 2022-7-1 19:54 编辑
(defun c:DY()
(setq snap (getvar "osmode"))
(setvar "osmode" 0)
(setvar "osmode" 1)
(setq PN "pdfFactory Pro")
(setq zz "C")
(setq AS 1);打印的页数为1页
(setq VDI 100) ; 横向两页间距为100,可以一次打印多页,根据需求自己改吧
(command "-plotstamp" "o" "") ;打开打印戳记
(setq P1 (getpoint "\n***第一角点: "))
(setq P2 (getcorner p1 "\n***第二角点: "))
(setq fx (if(>(apply '-(mapcar 'abs(mapcar '- p1 p2)))0)"L" "P"))
(setq sn 0)
(while (/= sn AS)
(setq PP (polar p1 0 (* VDI sn)))
(setq MP (polar p2 0 (* VDI sn)))
(setq sn (+ sn 1))
(command "-plot" "y" "model" PN "A4" "m" fx "n" "w" PP MP "f" zz "y" "monochrome.ctb" "y" "n" "n" "n" "y" )
)
(setvar"osmode" snap);恢复捕捉
(PRINC "\n 打印成功 !!!")
(command "-plotstamp" "off" "") ;关闭打印戳记
(PRINC)
) 目前只会默认上一次的打印戳记设置,即上一次有戳记,这一次就有 ludaweb 发表于 2022-7-1 19:52
(defun cY()
(setq snap (getvar "osmode"))
大佬一出手,就知有木有 ludaweb 发表于 2022-7-1 19:52
(defun cY()
(setq snap (getvar "osmode"))
谢谢大哥 这个程序要选项有N次,这个是工作效率吗 为什么要用这个哟。具体不明白 感觉还是不行
页:
[1]