caoteddy 发表于 2012-5-7 15:40:32

求教:调用-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

请指教。谢谢


caoteddy 发表于 2012-5-7 16:36:50

可以指点一下吗?

Andyhon 发表于 2012-5-7 16:51:15

"\" ==> "\\"
"\\" ==>"\\\\"

caoteddy 发表于 2012-5-7 16:58:16

已经OK了。谢谢Andyhon 。

longer1000 发表于 2012-5-8 09:19:17

好像还是不行啊

革天明 发表于 2012-9-15 14:49:01

longer1000 发表于 2012-5-8 09:19 static/image/common/back.gif
好像还是不行啊

你看看出错的原因,在LISP中\有特殊意义:后面的字符保持其原本的意思,\\只能表示一个\符号,

燃烧 发表于 2012-9-15 17:00:11

本帖最后由 燃烧 于 2012-9-15 17:01 编辑

打印那一句要改成下面的才行:
(vl-cmdf      "_PLOT"         "y"          ""         printer
                        "A4"         ""          "P"         ""            "W"
                        PT1         PT3          "FIT"          "居中打印(c)"            "Y"
                        "RYS-ACAD-V1.ctb" ""         ""            ""
                        ""         ""
                     )

alexmai 发表于 2012-9-15 17:16:01

可以用~很不错~~

longer1000 发表于 2012-9-16 08:35:40

有空再试试

sjl_fyl 发表于 2024-6-13 21:02:28

{:1_1:}学习
页: [1]
查看完整版本: 求教:调用-plot命令时,打印机名字出错(已解决)