如何在Winform中显示.dwg(AutoCAD) [英] How to display.dwg(AutoCAD) in Winform

查看:821
本文介绍了如何在Winform中显示.dwg(AutoCAD)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想在winform中显示autocad文件.如何执行此操作?

I want just display autocad files in winform.How to do this?

推荐答案

这并不容易.显示不会太困难;这将是一种基于图形数据模型的图形渲染技术.如果您遇到任何问题,我将很快为您提供帮助.

真正的问题是解析DWG文件.基本上,您可以使用尝试反向工程格式的其他公司的专有Autodesk RealDWG产品.我个人使用了开放设计联盟的产品(该产品是用纯C ++编写的,风格如此紧凑,这使得导出方法并在.NET中P/Invoke它们非常困难),还有一个我现在不记得了. ,则需要查看我的旧记录.这并不容易.产品足够昂贵,存在某些问题,而最棘手的问题与性能有关.与Autodesk的交易伴随着许多诉讼.在我看来,这是一家非常糟糕的公司,几年前成功率先开发了非常糟糕和沉重的产品,并在市场上占据了重要位置.可能是我做错了……看这篇文章: http://en.wikipedia.org/wiki/.dwg [^ ].

—SA
This is not easy. The display would not be too difficult; this would be a pretty usual technique of rendering graphics based on some data model of graphics. If you ever come to this and face any problems, I would be able to help it quickly.

The real problem is parsing DWG files. Basically, you can either use proprietary Autodesk RealDWG products of other companies who tried to reverse engineer the format. I personally used the product of Open Design Alliance (which is written in pure C++ in such a tight style which makes it pretty hard to export methods and P/Invoke them in .NET) and one more which I don''t remember right now, would need to look at my old records. It wasn''t easy. The products were expensive enough, had certain problem with most difficult problems were related to performance. Dealing with Autodesk was accompanied with number of lawsuits. In my opinion, this is extremely bad company which managed to pioneer extremely bad and heavy product years ago and grab key positions on the market. May be I am not right about it… Look at this article: http://en.wikipedia.org/wiki/.dwg[^].

—SA


Autocad提供了将图形文件转换为JPG或BMP文件的选项.
我们可以在这里使用它吗?
因为从C#代码很难从.dwg格式获取图形然后在窗体上显示.

如果我们能够将其转换为JPEG或JPG或BMP或任何其他图像支持格式,则非常简单.....

试试吧.
Autocad provides an option of converting the drawing files to JPG or BMP files.
can we use it here.
Because it is very difficult from C# code to get the drawing from .dwg format and then display on form.

If we could able to convert it to JPEG OR JPG or BMP or any other image supporting format, it is very easy.....

try that.


这篇关于如何在Winform中显示.dwg(AutoCAD)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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