是否有用于解析 AutoCAD 文件的库? [英] Are there any libraries for parsing AutoCAD files?

查看:37
本文介绍了是否有用于解析 AutoCAD 文件的库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何用于解析 AutoCAD 文件(DWG 或 DXF)的库(最好是开源的)?

Are there any libraries (preferably open-source) for parsing AutoCAD files (DWG or DXF)?

推荐答案

C# 中的开源 cad 绘图 (dwg) 库 &.Net CAD 组件,可以读/写 dxf/.dwg 文件

没有任何可用于免费解析 DWG 的东西我认为是可靠的.开放设计联盟往往更便宜在比 AutoDesk 的 RealDWG 产品更多的操作系统上运行.对于尚未交付代码的初创公司,ODA 有一个价格层 - RealDWG 没有.ODA 和 AutoDesk 都在论坛中提供支持 - 您必须是 ODA 的成员,但 AutoDesk 的论坛位于 http://discussion.autodesk.com/forums/ 在这里您可以免费加入.

There isn't anything available for parsing DWG for free that I would regard as reliable. The Open Design Alliance tends to be cheaper & runs on more OS's than AutoDesk's RealDWG offering. The ODA has a price-tier for startups who aren't yet shipping code - RealDWG doesn't. Both the ODA and AutoDesk offer support in forums - you have to be a member of the ODA but AutoDesk's forums are at http://discussion.autodesk.com/forums/ where you can join for free.

DXF 是一种文本文件格式(类似于 XML),您可以使用您喜欢的任何内容进行解析 - 如果您知道要查找的内容.您可能会更幸运地为此找到一个库(我还没有研究过),但这将涉及从 DWG 格式的转换.请注意,DXF 格式有多种版本

DXF is a text-file format (similar to XML) which you can parse with anything you like - if you know what you're looking for. You may have more luck with finding a library for that (I haven't looked into it) but that would involve conversion from DWG format. Note that there are various releases of the DXF format

您可以试用 Autodesk 的 DWG Trueview(免费),但它是一个最终用户查看器 - 它没有正式提供 API.有些人过去在自动化方面取得了不同程度的成功.我还没有尝试过自己&我强烈怀疑最新版本已经针对这一点进行了强化.

You can try Autodesk's DWG Trueview (free) but it is an end-user viewer - it doesn't officially offer an API. Some people have had varying degree of success in the past automating it. I haven't tried myself & I strongly suspect the latest versions have been hardened against that.

最终,如果您正在为可能坚持或至少不愿使用官方"AutoCAD 库和与之配套的可信 DWG"BS 的知名客户工作,那么您可能需要投资成为 Autodesk Developer Network 的会员.

Ultimately, if you are working for high-profile clients who are likely to insist on, or at least balk at the absence of 'official' AutoCAD libraries and the "Trusted DWG" BS that goes with it then you may need to invest in a membership of the Autodesk Developer Network.

作为一个长期的最终用户,我可以告诉你,ODA 的开发人员比 AutoCAD 对错误报告的响应更快.

As a long-time end user I can tell you the devs at the ODA are more responsive to bug reports than AutoCAD.

这篇关于是否有用于解析 AutoCAD 文件的库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆