回复 Andyhon 的帖子
这是我的测试程序,返回结果不正确。是不是我调用您的程序调用错了?测试版本:CAD2004、CAD2008恳请老大指点,谢谢!看不懂Vlisp程序,一头雾水
;;;测试程序
;;;电脑安装的打印机,两个。
;;;"pdfFactory Pro"
;;;"HP LaserJet 5000 Series PCL"
(defun C:TT (/ ad uu)
(vl-load-com)
(setq ad (vla-get-activedocument (vlax-get-acad-object)))
(setq uu (GetCanonicalMediaNamesOfConfigname ad "pdfFactory Pro")) ; 列表p
; dfFactory Pro打印机的纸张类型
(princ "\npdfFactory Pro打印机的纸张类型为:\n")
(princ uu)
(princ)
)
;;; 得到uu的列表为:(User256 User281 User280 User279 User278 User277
;;; User276 User275 User274 User273 User272 User271 User270 User68 User67
;;; User66
;;; User65 User64 User63 User62 User61 User60 User59 User58 User57 User56
;;; User55
;;; User54 User53 User52 User51 User50 User47 User46 User45 User44 User43
;;; User42
;;; German Legal Fanfold German Std Fanfold US Std Fanfold 6 3/4 Envelope
;;; Envelope
;;; Monarch Envelope Envelope B6 Envelope B5 Envelope B4 Envelope C65
;;; Envelope C6
;;; Envelope C4 Envelope C3 Envelope C5 Envelope DL E size sheet D size
;;; sheet C
;;; size sheet Envelope #14 Envelope #12 Envelope #11 Envelope #10 Envelope
;;; #9 Note
;;; 11x17 10x14 Quarto Folio B5 (JIS) B4 (JIS) A5 A4 Small A4 A3 Executive
;;; Statement Legal Ledger Tabloid Letter Small Letter)
(defun GetCanonicalMediaNames (ad)
(vla-RefreshPlotDeviceInfo (vla-get-activelayout ad))
(vlax-safearray->list (vlax-variant-value
(vla-GetCanonicalMediaNames
(vla-item
(vla-get-layouts ad) "Model"
)
)
)
)
)
(defun GetLocaleMediaNames (ad / mn mnl)
(setq la (vla-item (vla-get-layouts ad) "Model"))
(foreach mn (GetCanonicalMediaNames ad)
(setq mnl (cons (vla-GetLocaleMediaName la mn) mnl))
)
(reverse mnl)
)
;;; (GetCanonicalMediaNamesOfConfigname ad "Acrobat PDFWriter")
(defun GetCanonicalMediaNamesOfConfigname (ad cn / oldcn al cmn)
(setq al (vla-get-ActiveLayout ad))
(setq oldcn (vla-get-configname al))
(vla-put-configname al cn)
(vla-RefreshPlotDeviceInfo al)
(setq cmn (GetCanonicalMediaNames ad))
(if (/= oldcn "None")
(vla-put-configname al oldcn)
)
(setq CanPaperSizeLIst cmn)
(setq layout al)
(setq PaperSize '()
index 0
)
cmn
)
;;; =================
Google ..... then
如果您有解析注册表的功底
http://www.threatexpert.com/report.aspx?md5=c26a709b31c829394c8178258b004c27
http://www.threatexpert.com/report.aspx?md5=61bb24ada4e14a2bd0c3a00409800378
http://www.threatexpert.com/report.aspx?md5=eba70e5cff7d02630a30a88a3a1b8b35
未涉及这一环节,直以搜寻资料提供构思的参考 感谢老大的帮助。谢谢 太棒了,感谢langjs的分享,正是我需要的! langjs 发表于 2011-4-21 08:30
感谢老大的帮助。谢谢
大师,最终的源码在哪里?能给下吗 你好,网络打印机怎么输入不了
(setq PaperSize (GetPaperList " \\192.168.0.142\左边"))
页:
1
[2]