10

I am expoloring currently an AutoCAD .NET API to create a dwg files from winform. Is this possible or should I look for another library? Are there any new tutorials of doing so? thanks

Thanks for all your answers .... I will stick with my old DXF implementation, since this is personal project.

0

5 Answers 5

5

I think your only choice if you want DWG is to use OpenDesign. If you don't want to pay what that costs, you can write DXF instead. I have used VectorDraw, which does give a reasonable object model, and can export DXF without any extra component (I think), or use OpenDesign to write DWG.

Sign up to request clarification or add additional context in comments.

1 Comment

Bump, I had an impression that AutoCAD .NET API gives that option (to create files). I think I'll stick with my DXF impelementation.
5

Here you have exacly how to do it. AutoCad includes an API for doing that. The problem is that you need to have AutoCad in the computer where your application remains.

4 Comments

Hi, I already check it out, but it not using AutoCAD .NET API rather an AutoCAD application itself. Is this is an only way?
Well, I think that what the AutoCad API does is running AutoCad and allowing to control it from another program. It also allows to run AutoCad in Invisible mode.
So, there is no way to create a Autocad dwg file just using AutoCad API and without AutoCad installed?
That would be a DWG API, not an AutoCad API.
4

Autodesk sell a library called RealDWG which allow you to read and write dwg file with C# without AutoCAD installed. ~ 2500 € / year.

http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=770257

You can also use DXF, which is easier to read and write (text file). The reference can be found here : http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=12272454&linkID=10809853

Comments

1

As mentioned by others, OpenDesign is one possibility. It is, however, prohibitively expensive for small companies; we have started using CadLib, which is far cheaper and seems to do the trick so far. It writes to DXF or DWG, and has fairly good documentation.

2 Comments

Open Design, used internally in your company, is only U$250, then U$100 per year. opendesign.com/Associate
Used internally yes; not, however, if you use it in an application that you actually want to sell.
0

If you're planning to create the file without having autocad running, then you CANNOT use the .net API. The use of the .net API basically requires AutoCAD (or the CoreConsole) to be running for it to work. (You can open other databases but you'd be doing it in process from Autocad.

If you don't want it running in process you can use the Interop API.

Or the other alternative is to is to write to a DXF format which can then be imported into AutoCAD (or any other CAD program) which is capable of reading the format.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.