Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want just display autocad files in winform.How to do this?
Posted

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
 
Share this answer
 
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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900