Question

i make an autocad add on with dot net 3.50 and i reference to acdbmgd.dll,acmgd.dll from autocad 2012 what can I do to make it run on both autocad 2010 and autocad 2011 if i should reference to acdbmgd.dll,acmgd.dll from autocad 2010 where can i get this dll while i just have autocad 2012

Was it helpful?

Solution

I have had some success using 2008 libraries in AutoCAD 2010 so using the libraries from AutoCAD 2010 is probably your best bet, although not guaranteed to work. It will be depend on exactly what you are doing.

You can download the libraries as part of the ObjectARX 2010 package from Autodesk Developer Center (at the bottom of the page). You can also get ObjectARX 2011 from there if needed.

OTHER TIPS

My best luck with longevity of AutoCAD Add-ons has been with AutoLISP. I have tools I wrote in 1995 that are still cooking strong now with no modification.

The .Net API is more compatible then the ActiveX ones, but there are still some differences.

You can always use Reflection to call the functions (call them by name), but there will be a bunch of checks to be done, and it will be a lot of work to have your app. react the same way on all versions.

Your best bet (what i would do at least) would be to make a wrapper class for each functionability you want. For example, I would create a "MyCircle" class to manipulate circles, and then, inside this class, make a generic function (ex.: "ChangeThickness(int newThickness)"), and do your reflection code in there, so you can control how the call is made depending on the versions of AutoCAD installed (for example to not call a specific function in a certain version of AutoCAD because it contains a bug). This will make an expandable layer that you will be able to re-use in all version of AutoCAD, and you will be able to support any changes in the API.

I do this for 2012 and 2013. There are some difference between them.

I generally start two project one with 2012 Acad.NET wizard and another with 2013 Acad .NET Wizard.

Update both simultaneously

Most cases its just copy paste some cases it will be different where in 2013 API have evolved for example in Civil3d 2012 there isnt any Co-Go point api where as in 2013 they have added that so in that case I need to change the code little bit to work in 2013.

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