- 积分
- 15292
- 明经币
- 个
- 注册时间
- 2016-1-26
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
本帖最后由 tigcat 于 2025-3-18 14:33 编辑
同事转来的图纸,复制时弹出这个提示:
"此应用程序检测到此操作中涉及了多个版本的 AEC 对象"
如何处理呢?
经过百度,
https://www.autodesk.com.cn/support/technical/article/caas/sfdcarticles/sfdcarticles/CHS/Error-opening-a-drawing-This-application-has-detected-a-mixed-version-of-AEC-objects.html
解决方案:执行以下操作之一:- 方法一:使用 -EXPORTTOAutoCAD 命令(或 AECTOACAD)重新保存文件。
- 方法二:安装所需的 Object Enabler。
- 方法三:在上次保存文件的更高版本 AutoCAD 中打开该文件。
实践过方法一,的确可行,就是如果这个带aec的dwg太多不知道怎么可以批量处理,难道一个一个打开?
方法一估计要2018及以上的cad才有的命令,cad2014反正是没有这个命令.
欢迎大侠留言指正.分享更好的办法.
可能要逼着用高版本cad了?但是平时工作用的插件/还有公司电脑硬件都是比较老的平台,换高版本的cad也不是特别合适.
;;20250318更新
补充具体的lisp操作方法:
(defun c:scr3 (/ currentdwg file file-list get-multi-files load-odclp openfile vl-filename-base-and-ext)
(setq file-list (LM:getfiles "选择需要批处理的图纸文件" "" "dwg"))
(setq openfile (open (setq file "c:/myscript.scr") "w"))
(foreach f file-list
(write-line (strcat "_.open \"" f "\"") openfile)
(write-line "_.DELAY 1000" openfile) ; 确保文件打开完成
(write-line "(command \"-exporttoautocad\" \"f\" \"2013\" \"s\" \".\" \"\" \"\")" openfile)
(write-line "_.qsave _.close" openfile)
)
(close openfile)
(command ".script" file)
(vl-file-delete file)
(princ)
)
;;;;20250305更新,补充批量处理lisp代码
方法一:
(defun C:BatchAECtoDWG (/ folder files file)
(setq folder (getfiled "选择文件夹" "" "dwg" 16)) ; 选择包含 DWG 的文件夹
(setq files (vl-directory-files folder "*.dwg" 1)) ; 获取所有 DWG 文件
(foreach file files
(command "._OPEN" (strcat folder file))
(command "._EXPORTTOAUTOCAD" (strcat folder "new_" file))
(command "._CLOSE")
)
(princ "批量处理完成!")
(princ)
)
方法二:
借助第三方插件:
下载并安装 AutoCAD 的批量处理插件,例如 AutoCAD Batch Converter 或 CAD Batch Command(可在 Autodesk 应用商店或第三方网站找到)。
在插件中加载所有 DWG 文件,设置命令为 EXPORTTOAUTOCAD,然后批量执行
方法三:
OPEN "C:\路径\文件1.dwg"
EXPORTTOAUTOCAD
"C:\路径\文件1_new.dwg"
CLOSE
OPEN "C:\路径\文件2.dwg"
EXPORTTOAUTOCAD
"C:\路径\文件2_new.dwg"
CLOS
|
|