明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2572|回复: 8

求教:调用-plot命令时,打印机名字出错(已解决)

[复制链接]
发表于 2012-5-7 15:40 | 显示全部楼层 |阅读模式
本帖最后由 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?
[Yes/No] <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

请指教。谢谢


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
 楼主| 发表于 2012-5-7 16:36 | 显示全部楼层
可以指点一下吗?

点评

"\\\10.20.53.3\Muratec MFX-1820/2010"  发表于 2012-5-7 16:52
前面再加个\试试。  发表于 2012-5-7 16:51
发表于 2012-5-7 16:51 | 显示全部楼层
"\" ==> "\\"
"\\" ==>"\\\\"
 楼主| 发表于 2012-5-7 16:58 | 显示全部楼层
已经OK了。谢谢Andyhon 。
发表于 2012-5-8 09:19 | 显示全部楼层
好像还是不行啊
发表于 2012-9-15 14:49 | 显示全部楼层
longer1000 发表于 2012-5-8 09:19
好像还是不行啊

你看看出错的原因,在LISP中\有特殊意义:后面的字符保持其原本的意思,\\只能表示一个\符号,
发表于 2012-9-15 17:00 | 显示全部楼层
本帖最后由 燃烧 于 2012-9-15 17:01 编辑

打印那一句要改成下面的才行:
(vl-cmdf        "_PLOT"         "y"          ""           printer
                        "A4"         ""          "P"           ""            "W"
                        PT1         PT3          "FIT"          "居中打印(c)"            "Y"
                        "RYS-ACAD-V1.ctb" ""           ""            ""
                        ""         ""
                       )
发表于 2012-9-15 17:16 | 显示全部楼层
可以用~很不错~~
发表于 2012-9-16 08:35 | 显示全部楼层
有空再试试
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-5-14 17:50 , Processed in 0.170153 second(s), 39 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表