Java中的AutoCAD库读取.dwg文件? [英] AutoCAD library in Java to read .dwg files?

查看:113
本文介绍了Java中的AutoCAD库读取.dwg文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何开源 Java 或 JavaScript 库可用于解析 .dwg 文件并从中获取对象.

Is there any open-source Java or JavaScript library available to parse .dwg files and get the objects from it.

我想从我的项目的文本表格中提取数据.

I would like to extract data from a table of text for my project.

与 JAVA 相比,AutoCAD 开发人员社区似乎更喜欢 .NET 和 C/C++.

It seems that the AutoCAD developer community prefers .NET and C/C++ over JAVA.

我找到的唯一免费替代方法是先将 .dwg 转换为 .dxf,然后使用 Kabeja 库从中读取.

The only free alternative I found is by converting .dwg to .dxf first and using the Kabeja lib to read from it.

推荐答案

感谢所有回答的人,我已经测试了您的所有提议,以下是我在 2015 年发现的:

Credits to all who have answered, I've tested all your proposition and here's what I've found , as of 2015:

目前没有免费且可靠的解决方案来读取和操作 .dwg 和 .dxf 文件.这尤其适用于 AutoCAD 的最新版本,例如:Autocad 2010、Autocad 2013 等、RF 2013、RF 2010.

There is currently no free AND reliable solution to read and manipulate .dwg and .dxf files. This applies especially to latest versions of AutoCAD, ex : Autocad 2010, Autocad 2013 etc, RF 2013, RF 2010.

可靠(且昂贵)的解决方案是 ODA 的 Teigha(每年 2000 美元)和 Autocad 的 C# 中的 RealDWG(每年 5000 美元)...

Reliable (and expensive) solutions would be Teigha by ODA (2000$ a year) and RealDWG in C# by Autocad (5000$ a year)...

更便宜的替代品如下:

  • AutoCAD I/O 每月 10 美元(根据 Augusto Gonclaves 的建议),但目前功能有限.
  • 编写 LISPS 例程并在 AutoCAD 2015/2016 的付费实例中使用 SCRIPT 文件运行它们..
  • 等待更完整的 AutoCad 核心控制台实现..

Kabeja 和 YCad 等开源库可能能够处理较旧的 AutoCAD 版本,但不要对它们抱有太大期望,因为这些项目自几年前就处于非活动状态.不过值得关注 Apache Tika,因为他们开始为 .dwg 文件编写解析器,但开发速度很慢.

Open-source libraries such as Kabeja and YCad may be able to deal with older AutoCAD versions but do not expect much from them as these projects are inactive since a few years ago. It's worth to keep an eye out for Apache Tika though, since they started writing parsers for .dwg files but development has been slow.

就个人而言,我认为 AutoDesk 现在在 CAD 市场上拥有强大而自私的垄断地位,他们让其他人难以加入..dwg 文件的格式版本变化如此频繁,我猜是开放的-源代码开发人员将不得不在某个时候放弃,转而使用官方产品.

On a personal note, I think that AutoDesk has a strong and selfish monopoly on the CAD market now and they are making it difficult for others to join in. The format's version of .dwg files changes so often and I guess open-source developers will have to give up at some point and use the official product instead.

希望未来几年有更多的开源解决方案

Let's hope for more open-source solutions in the coming years

这篇关于Java中的AutoCAD库读取.dwg文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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