求教:调用-plot命令时,打印机名字出错(已解决)
本帖最后由 caoteddy 于 2012-5-7 16:59 编辑程序如下:
(defun c:180 ( )
(setq p1 (getpoint "select the first point"))
(setq p2 (getcorner p1 "select the other point"))
(setq st "landscape")
(setq x1 (car p1) y1 (cadr p1) x2 (car p2) y2 (cadr p2))
(setq x (abs (- x1 x2)) y (abs (- y1 y2)) )
(if (> y x) (setq st "portrait"))
(command "-plot" "YES" "" "\\10.20.53.3\Muratec MFX-1820/2010" "A4 (210 x 297 mm)""inches" st "" "window" p1 p2 "Fit" "center" "" "monochrome.ctb" "" "" "" "" "")
(command "pickbox" 8)
(princ)
)
运行的时候运行时打印机名字却变为:\10.20.53.3\Muratec MFX-1820/2010
Command: 180
select the first pointselect the other point-plot Detailed plot configuration?
<No>: YES
Enter a layout name or [?] <Model>: Enter an output device name or [?] <Adobe
PDF>:\10.20.53.3\Muratec MFX-1820/2010 < \10.20.53.3\Muratec MFX-1820/2010>
not found.
Enter an output device name or [?] <Adobe PDF>: A4 (210 x 297 mm) <A4 (210 x
297 mm)> not found.
Enter an output device name or [?] <Adobe PDF>: inches <inches> not found.
Enter an output device name or [?] <Adobe PDF>: landscape <landscape> not found.
Enter an output device name or [?] <Adobe PDF>: Enter paper size or [?] <A4>:
window
Command:
Command:
Command: Fit Unknown command "FIT".Press F1 for help.
Command: center Unknown command "CENTER".Press F1 for help.
Command: 180 Unknown command "180".Press F1 for help.
Command: monochrome.ctb Unknown command "MONOCHROME.CTB".Press F1 for help.
Command: 180 Unknown command "180".Press F1 for help.
Command: 180 Unknown command "180".Press F1 for help.
Command: 180 Unknown command "180".Press F1 for help.
Command: 180 Unknown command "180".Press F1 for help.
Command: 180 Unknown command "180".Press F1 for help.
Command: pickbox
Enter new value for PICKBOX <8>: 8
请指教。谢谢
可以指点一下吗? "\" ==> "\\"
"\\" ==>"\\\\" 已经OK了。谢谢Andyhon 。 好像还是不行啊 longer1000 发表于 2012-5-8 09:19 static/image/common/back.gif
好像还是不行啊
你看看出错的原因,在LISP中\有特殊意义:后面的字符保持其原本的意思,\\只能表示一个\符号, 本帖最后由 燃烧 于 2012-9-15 17:01 编辑
打印那一句要改成下面的才行:
(vl-cmdf "_PLOT" "y" "" printer
"A4" "" "P" "" "W"
PT1 PT3 "FIT" "居中打印(c)" "Y"
"RYS-ACAD-V1.ctb" "" "" ""
"" ""
) 可以用~很不错~~ 有空再试试 {:1_1:}学习
页:
[1]