Question

For my project, I need to generate CAD drawing (almost a blueprint of a tank) through my VB.NET application. The app takes in some user input & based on this, it generates the geometry of the tank.

I am using Microsoft Visual Studio Professional 2012 & coding in the VB.NET language.

I have browsed through a lot of AutoCAD documentation but could not find exactly how & where are the modules hidden, for me to add them into my code.

I stumbled accross one particular document which is where I found how to add the relevant files as reference to my VB solution. However, after adding some particular files I could then do Imports AutoCAD, but all the docs show that I must use Autodesk.AutoCAD. On inspection of the available modules/methods of the Imports AutoCAD I can see that it isn't complete as needed for the application development.

Can somebody please guide me as to how could I find or go about adding correct reference files to my VS solution to get full functionality from the AutoCAD modules? Thanks!

Was it helpful?

Solution

I posted this quite some time ago. It contains the information that you need

How to close a file in Autocad using C# keeping acad.exe running?

You can also download any of the AutoCAD .NET API's from here:

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

Just in case someone else need the help.

  1. Download the appropriate AutoCAD .NET API using the aforementioned link.
  2. Put them in a location of your choosing.

general:


on the appropriate project in your visual studio's solution, right click -> Add Reference.

select Browse on left, click the browse button and go to the path where you saved the ObjectARX download.


Inprocess:


Navigate to the inc directory and select the AcDbMgd.dll and AcMgd.dll then click add.

For these make sure to set the copy local property to false.


Interop:


Navigate to the appropriate directory: inc-win32 or inc-x64 depending on your processor. select the Autodesk.AutoCAD.Interop.Common.dll and Autodesk.AutoCAD.Interop.dll then click add.


and unless you have an interest in the AutoCAD interface don't worry about the AcCui.dll

Hope this helps some one out :)

OTHER TIPS

So, looking up more & more documentation led me to stumble across this

I found the dlls by simple file search for respective dlls metioned below in my local AutoCAD 2014 installation folder (C:\Program Files\Autodesk\AutoCAD 2014)

As per the documentation, following dlls are important ones -

  1. AcCui.dll
  2. acdbmgd.dll
  3. acmgd.dll
  4. Autodesk.AutoCAD.Interop.dll
  5. Autodesk.AutoCAD.Interop.Common.dll

The credit for the last 2 dlls goes to Trae Moore.

How to add references to the dlls was mentioned in the documentation link.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top