乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 37|回复: 12

[编程交流] 非常奇怪的错误!!!!

[复制链接]

96

主题

322

帖子

234

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
474
发表于 2022-7-5 18:52:06 | 显示全部楼层 |阅读模式
该代码运行正常:
  1.   (command "-plot" "Y" "" "DWG TO PDF.PC3" "Iso full bleed A3 (420.00 x 297.00 MM)" "" "L" "" "Window" pt1 pt2 "F" "C" "" "" "" "" "" "" "" )

但当我刚更换打印机时,显示以下错误:
  1. (command "-plot" "Y" "" "HP Deskjet 1280 series.PC3" "Iso full bleed A3 (420.00 x 297.00 MM)" "" "L" "" "Window" pt1 pt2 "F" "C" "" "" "" "" "" "" "" )

错误::
  1. Command: Plot1
  2. Select Lower Left Hand Corner
  3.                of Plotting Area:
  4. Thanks.......Unknown command "Plot1".  Press F1 for help.
  5. Unknown command "L".  Press F1 for help.
  6. Unknown command "PP".  Press F1 for help.
  7. Unknown command "WINDOW".  Press F1 for help.
  8. Unknown command "F".  Press F1 for help.
  9. Unknown command "C".  Press F1 for help.
  10. Unknown command "PP".  Press F1 for help.
  11. Unknown command "PP".  Press F1 for help.
  12. Unknown command "PP".  Press F1 for help.
  13. Unknown command "PP".  Press F1 for help.
  14. Unknown command "PP".  Press F1 for help.
  15. Unknown command "PP".  Press F1 for help.
  16. Unknown command "PP".  Press F1 for help.
回复

使用道具 举报

26

主题

1495

帖子

20

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
118
发表于 2022-7-5 18:59:41 | 显示全部楼层
尝试将CMDECHO设置为1,将CMDDIA设置为1,以便调试这些。
 
通过(命令)打印时,必须具有特定设备所需的精确序列。它们并不都一样。
 
有时使用完整的参数值也可以帮助代替简单的“”。
回复

使用道具 举报

12

主题

395

帖子

384

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
60
发表于 2022-7-5 19:04:44 | 显示全部楼层
当使用plot命令时,尝试手动遍历以查找问题,或者如David所说,确保打开了命令echo,以便可以看到错误发生的位置。
回复

使用道具 举报

12

主题

395

帖子

384

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
60
发表于 2022-7-5 19:07:20 | 显示全部楼层
你也可以查看这个线程。
回复

使用道具 举报

96

主题

322

帖子

234

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
474
发表于 2022-7-5 19:15:11 | 显示全部楼层
这是完整代码:
  1. (defun c:XSX ( )
  2. (setvar 'CMDECHO 1)
  3. (setvar 'CMDDIA 1)
  4.     (setq pt1 (getpoint "\nSelect Lower Left Hand Corner
  5.                of Plotting Area: "))
  6.         (setq pt2 (list (+ 40 (car pt1)) (+ 27.8 (cadr pt1)) 0.))
  7.    (prompt "\nThanks.......")
  8.      (command "-plot" "Y" "" "HP Deskjet 1280 series.PC3" "Iso full bleed A3 (420.00 x 297.00 MM)" "" "L" "" "Window" pt1 pt2 "F" "C" "" "" "" "" "" "" "" )
  9.     ;(command "-plot" "Y" "" "DWG TO PDF.PC3" "Iso full bleed A3 (420.00 x 297.00 MM)" "" "L" "" "Window" pt1 pt2 "F" "C" "" "" "" "" "" "" "" )
  10.    (princ)
  11. )

这是compltet erorr:
  1. Command: XSX
  2. Select Lower Left Hand Corner
  3.                of Plotting Area:
  4. Thanks.......-plot Detailed plot configuration? [Yes/No] <No>: Y
  5. Enter a layout name or [?] <Model>: Enter an output device name or [?] <EPSON Stylus Photo 1410 Series>: HP Deskjet 1280 series.PC3 Enter paper size or [?] <Letter>: Iso full bleed A3 (420.00 x 297.00 MM)
  6. Command: XSX
  7. Unknown command "XSX".  Press F1 for help.
  8. Command: L Unknown command "L".  Press F1 for help.
  9. Command: XSX
  10. Unknown command "XSX".  Press F1 for help.
  11. Command: Window Unknown command "WINDOW".  Press F1 for help.
  12. Command:
  13. Command:
  14. Command: F Unknown command "F".  Press F1 for help.
  15. Command: C Unknown command "C".  Press F1 for help.
  16. Command: XSX
  17. Unknown command "XSX".  Press F1 for help.
  18. Command: XSX
  19. Unknown command "XSX".  Press F1 for help.
  20. Command: XSX
  21. Unknown command "XSX".  Press F1 for help.
  22. Command: XSX
  23. Unknown command "XSX".  Press F1 for help.
  24. Command: XSX
  25. Unknown command "XSX".  Press F1 for help.
  26. Command: XSX
  27. Unknown command "XSX".  Press F1 for help.
  28. Command: XSX
  29. Unknown command "XSX".  Press F1 for help.
  30. Command:

:o:o:o:o:o:o:o:o:o:o:o:o:o:o
回复

使用道具 举报

rlx

21

主题

1505

帖子

1551

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
81
发表于 2022-7-5 19:18:30 | 显示全部楼层
“手动”尝试时,请确保打印机的字符串和纸张大小完全相同。使用-plot逐步完成此过程,可能会复制并粘贴这些字符串。有时,一台打印机的尺寸为“A3”,而另一台打印机的尺寸为“A3”(420 x 297毫米),那么您的代码就会失败
 
Gr.Rlx
回复

使用道具 举报

96

主题

322

帖子

234

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
474
发表于 2022-7-5 19:24:39 | 显示全部楼层
谢谢你的帮助David Bethel&Commandobill&rlx
有了你的帮助,一切都好了:):):)
 
在上面的代码中,有没有一种在绘图之前观看预览的方法?????
回复

使用道具 举报

rlx

21

主题

1505

帖子

1551

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
81
发表于 2022-7-5 19:27:37 | 显示全部楼层
是的,有:http://knowledge.autodesk.com/support/autocad-utility-design/troubleshooting/caas/CloudHelp/cloudhelp/2016/ENU/AutoCAD-ActiveX/files/GUID-6126F7B4-B02D-4EDA-B297-BCCAF6D92ADF-htm.html
 
gr.Rlx
回复

使用道具 举报

96

主题

322

帖子

234

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
474
发表于 2022-7-5 19:32:56 | 显示全部楼层
如果我想画矩形并绘图,我添加了矩形代码:
  1. (setq pt1 (getpoint "\nSelect Lower Left Hand Corner of Plotting Area: "))
  2. (setq pt2 (list (-(car pt1) 27. (+ 40 (cadr pt1)) 0.))
  3. (command "._rectang" pt1 pt2 pause)
  4. (command "-plot" "Y" "" "DWG TO PDF.PC3" "Iso full bleed A3 (420.00 x 297.00 MM)" "" "P" "" "Window" pt1 pt2 "F" "C" "" "" "" "" "" "" "" )

只是绘图,没有画矩形???为什么?
回复

使用道具 举报

rlx

21

主题

1505

帖子

1551

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
81
发表于 2022-7-5 19:42:06 | 显示全部楼层
为什么在矩形中暂停?认为你是一个男人(回车)
 
Gr.Rlx
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-12 13:12 , Processed in 0.361191 second(s), 72 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表