乐筑天下

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

[编程交流] 未知(command-s)故障。

[复制链接]

1

主题

3

帖子

2

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-5 17:02:47 | 显示全部楼层 |阅读模式
我在尝试使用AutoCAD MEP 2017导入DGN并保存DWG时遇到了此LISP文件的问题。当我运行脚本时,它显示以下错误:
这发生在CAD中显示任何类型的活动之前,所以我假设这发生在文件中的第一个(command-s)上。知道这是什么原因吗?我使用的代码基于m.Moolhuysen的版本。
 
编辑:可能值得注意的是,我重新启动了CAD,现在似乎是在第一次延迟之后发生的,我根本没有更改代码。
 
  1. (defun C:KURCONV (/ fil tx1 tx2 tx3 tx5)
  2.    (setq tx1 "C:\\Users\\mgreathouse\\Desktop\\DGN to DWG\\dgnlist.txt"   ;; list of file names to be imported
  3.        tx2 "C:\\Users\\mgreathouse\\Desktop\\DGN to DWG\\Input DGNs\"    ;; input folder.
  4.        tx3 "C:\\Users\\mgreathouse\\Desktop\\DGN to DWG\\Output DWGs\"   ;; output folder.
  5.    )
  6.    (setq fil (open tx1 "r"))
  7.    (setq tx5 (read-line fil))
  8. ; repeats program until all lines from tx1 have been read in
  9.    (while tx5
  10.        (command-s "_-DGNIMPORT" (strcat tx2 tx5) "" "" "")
  11.        (command-s "._DELAY" 1000)
  12.        (command-s "_Z" "e")
  13.        (command-s "_-LAYOUT" "set" "20x29")
  14.        (command-s "_MVIEW" "L" "ALL" "OFF" "")
  15.        (command-s "_.MSPACE")
  16.        (command-s "_Z" "e")
  17.        (command-s "_.PSPACE")
  18.        (command-s "_MVIEW" "L" "ALL" "ON" "")
  19.        (setq tx5 (substr tx5 1 (- (strlen tx5) 4)))
  20.        (command-s "_SAVEAS" "" (strcat tx3 tx5))
  21.        (command-s "._DELAY" 1000)
  22.        (command-s "_-LAYOUT" "set" "model")
  23.        (command-s "_DELETE" "all" "")
  24.        (setq tx5 (read-line fil))
  25.    )
  26. (close fil)
  27. )
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-5 17:37:18 | 显示全部楼层
请尝试以下操作:
  1. 2
回复

使用道具 举报

1

主题

3

帖子

2

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-5 17:52:40 | 显示全部楼层
这真是太棒了!一旦我转换了所有这些DGN,我将对您使用的一些lisp函数做一些研究,找出它们的区别,以及为什么这样做更好。今晚应该让我很忙,并帮助我学习更多,因为我对AutoLISP很陌生。
 
谢谢!
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-5 18:22:24 | 显示全部楼层
不客气!
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-13 10:12 , Processed in 0.764784 second(s), 61 queries .

© 2020-2025 乐筑天下

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