wuzheng80425 发表于 2020-9-3 08:17:38

PDF打印设置,设置改变为了,跪求大神指点

在明径网站找了一个打印设置程序(引用别人的程序自己用,再次向原作者感激),DY1可以运行,到DY2设置PDF就不能打印设置了,不知问题出在哪里,求路过的高手指点,小弟感激不尽!


(defun ChangePlotConfig (configName styleSheet papersize PlotRotation Plotscale / acApp acDocs layouts)
(vl-load-com)
(setq acApp (vlax-get-acad-object))
(setq acDocs (vla-get-documents acApp))
(vlax-for doc acDocs
    (setq layouts (vla-get-layouts doc))
    (vlax-for layout layouts
      (vla-put-configname layout configName)         ;打印机
      (vla-put-stylesheet layout styleSheet)         ;打印样式
      (vla-put-CanonicalMediaName layout papersize)    ;图纸尺寸
      (if (= "纵向" PlotRotation)
          (vla-put-PlotRotation layout ac0Degrees)   ;图形方向纵向
          (vla-put-PlotRotation layout ac90Degrees)    ;图形方向横向
      )
      (if (= "按图纸空间缩放" Plotscale)
          (vla-put-standardscale layout acScaleToFit);比例      按图纸空间缩放
          (vla-put-standardscale layout ac1_100)       ;比例      1:100
      )
      (vla-put-paperunits layout acMillimeters)      ;单位      米
    )
)
)


(defun c:DY1()
(ChangePlotConfig "RICOH Aficio MP C3502 PCL 5c" "巴夏----2020虚线是绿色.ctb" "A4" "横向" "按图纸空间缩放" )
(princ "\n当前打印机巴夏打印机C3502 ,纸张A4,白纸,横向进纸,按图纸空间缩放打印! ")
(princ)
)


(defun c:DY2()
(ChangePlotConfig "DWG To PDF.pc3" "巴夏----2020虚线是绿色.ctb" "NICO------A4横向" "横向" "按图纸空间缩放" )
(princ "\n当前打印机为PDF打印,纸张NICO------A4横向,白纸,横向进纸,按图纸空间缩放打印! ")
(princ)
)



页: [1]
查看完整版本: PDF打印设置,设置改变为了,跪求大神指点