.NET

Reply
Active Contributor
DouceDeux
Posts: 46
Registered: ‎09-04-2012
Message 1 of 7 (1,290 Views)

AutoCAD 2012 API vs. AutoCAD 2013 API

1290 Views, 6 Replies
09-04-2012 03:44 PM

Hello,

 

I'm new to programming for AutoCAD. I've just started on a project where we'll be doing just that, programming for and in AutoCAD.

 

We're gonna spend considerable resources on the development of new AutoCAD oriented software but as the initial phase that we're in, we've come to a bit of a dilemma.

 

I've seen the interface of AutoCAD 2012 and 2013, they look pretty similar, right? This is why I assumed, before starting this project and meeting the offices, it would be safe to develop for AutoCAD 2012. I started doubting this when I read a post where it said that the API had a major change from the 2012 to the 2013 version.

 

Now, the guys over here are still using AutoCAD 2010, I guess licences are expensive :smileyfrustrated: and the 2010 does just what they need it to do, but their inface is so different (no ribbon) and I'm guessing this will make programming for 2010 much different than for 2011/2012/2013 because those visual changes usually come with a lot with internal changes.

 

I had not used AutoCAD before the start of this project so it's all the same to me but not for the project itself.

What I'd like to know is what your thoughts are and what  you'd recommend to develop for, 2012, 2013(too new, doubtful choice), or stick to 2010 (though we're not necessarily developing for the guys here using AutoCAD 2010, and ultimately, they could upgrade to 2012/13).

 

We're yet to find out a bit more about the AutoCAD-version usage standards on other countries and see what's more convenient.

 

Of course, one can create a program that supports all and every single version of AutoCAD that had an API, but that'd be a lot to take on.

 

 

Thanks in advance for your time, reading and replying.

 

P.D. Bonus question: What's Autodesk ObjectARX to be precise?

*Expert Elite*
dave.wolfe
Posts: 659
Registered: ‎12-04-2009
Message 2 of 7 (1,276 Views)

Re: AutoCAD 2012 API vs. AutoCAD 2013 API

09-04-2012 05:59 PM in reply to: DouceDeux

So here's a brief history lesson on .Net + AutoCAD.

 

In AutoCAD 2005, you could create addins with .net and AutoCAD.  From then until AutoCAD 2011, you could use the same dll as long as none of the AutoCAD functions you referenced changed.  The ribbon api in AutoCAD 2009 was introduced, but was weak, and didn't become stabilized until AutoCAD 2010.

 

For AutoCAD 2012, they moved to .Net 4.0.  With .net 4, Microsoft introduced the first breaking changes, where you have to recompile using .Net 4.  They also started using an Autoloader format that allows you to bundle plugins and store them in a specific directory which AutoCAD will load from.

 

In AutoCAD 2013, AutoCAD added a new file that must be referenced.  In addition to acdbmgd.dll and acmgd.dll, you must also reference accore.dll.  

 

All that to say, the .Net AutoCAD api has seen a lot of major changes, some from Autodesk but some forced down from Microsoft (.net 4.0).

 

B/c I'm in a relatively new market (Plant 3D), I'm trying to get away with targeting AutoCAD 2013 and higher - saves me a lot of work.  Obviously, some people can't do that, but you'll have to structure your application and build processes differently.

 

My suggestion is to buy into the ADN membership.  For a decent price it gives you access to tech support as well as mutliple licenses - at a much lower cost.

 

ObjectArx is a C++ api that can be used in managed or unmanaged code.  I use it sometimes if there is a feature not exposed in .Net that is in the C++ api (like selected xref entities with a window).  It's a little lower level, but not too difficult, especially if you already know C++.

 

Make sure you check out the my first plugin series if you've not yet: http://usa.autodesk.com/adsk/servlet/index?id=18162650&siteID=123112

Dave Wolfe
Isaiah 57:15

ECAD, Inc.
Tips and Tricks on our blog: Process Design, from the Outside

A P3D Authorized Reseller
Board Manager
StephenPreston
Posts: 368
Registered: ‎05-22-2006
Message 3 of 7 (1,231 Views)

Re: AutoCAD 2012 API vs. AutoCAD 2013 API

09-05-2012 10:53 AM in reply to: dave.wolfe

I have to say Dave - that's a great summary. Nice and concise. Kudos to you :-).

 

Small typo - accore is accoremgd.

Cheers,

Stephen Preston
Autodesk Developer Network
*Expert Elite*
dave.wolfe
Posts: 659
Registered: ‎12-04-2009
Message 4 of 7 (1,225 Views)

Re: AutoCAD 2012 API vs. AutoCAD 2013 API

09-05-2012 12:02 PM in reply to: StephenPreston

Thanks for the catch!

 

Couldn't have done it without all the rice and wine.

Dave Wolfe
Isaiah 57:15

ECAD, Inc.
Tips and Tricks on our blog: Process Design, from the Outside

A P3D Authorized Reseller
Active Contributor
DouceDeux
Posts: 46
Registered: ‎09-04-2012
Message 5 of 7 (1,185 Views)

Re: AutoCAD 2012 API vs. AutoCAD 2013 API

09-06-2012 06:27 AM in reply to: DouceDeux

Thanks indeed for the the reply. It gave me some good insight into what we're gonna need to do and the assessment of our software requirements.

 

I'm thinking developing under the 2012 API for now for backward compatibility.

 

I read the ADN page and it says the memberships are for each calendar year running from January 1 to December 31. Does that mean that if I decide to join on December 15th, I'll only get 16 day of membership? (I realize I should ask this to costumer support but since I'm here, just thought I'd share a doubt I had)

 

Once again, thanks for the info.

*Expert Elite*
dave.wolfe
Posts: 659
Registered: ‎12-04-2009
Message 6 of 7 (1,179 Views)

Re: AutoCAD 2012 API vs. AutoCAD 2013 API

09-06-2012 06:51 AM in reply to: DouceDeux

I think I've seen a comment where if you purchase October - December, you get the following year for free, so that's not a worry.

 

If you're going for backwards compatibility, double check to make sure you can use the dll compiled for .net 4 (AutoCAD 2012) in the previous versions.  I know I had trouble getting a .Net 3.5 dll to work in AutoCAD 2012, but it may have backwards compatibility. 

Dave Wolfe
Isaiah 57:15

ECAD, Inc.
Tips and Tricks on our blog: Process Design, from the Outside

A P3D Authorized Reseller
Distinguished Contributor
fxcastil
Posts: 404
Registered: ‎11-11-2002
Message 7 of 7 (1,131 Views)

Re: AutoCAD 2012 API vs. AutoCAD 2013 API

09-06-2012 03:26 PM in reply to: DouceDeux

"and the 2010 does just what they need it to do, but their inface is so different (no ribbon)"

 

You can turn off ribbons in AutoCad 2010 ( and other Versions) and use the "Classic" view with toolbars.

Lots of people don't like chainging the look of the user interface from what they are used to.

 

 

 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community