Compatibility of AutoCAD applications between releases

This is a huge topic, so I'm not going to be able to do it justice in this one post.

Applications developed using AutoCAD's APIs need to be tested (and sometimes ported) to make sure they work with a new release of the AutoCAD platform. For several generations of AutoCAD we have consciously chosen to break binary application compatibility once every 3 releases (historically - but in recent memory - this happened for AutoCAD 2000, 2004 and now 2007). To make applications work on interim releases they might need minor porting work to migrate their use of Registry settings to be under the right location (for example), but we do test to minimise the pain experienced by our developers.

Also, applications implemented using different APIs typically require different efforts to port from one release to the next. Generally LISP applications are fairly portable between releases (although the names and locations of support files may change from time to time), as are COM clients (such as VBA and external VB). Applications using the managed API (C# or VB.NET clients) are a little more portable than ObjectARX (C++) applications, but as the managed API has been evolving quickly we have so far not always enforced compatibility (the exception being between AutoCAD 2005 and 2006, which was otherwise a binary application compatible release), Moving forwards I would expect to see more stability and release-to-release compatibility in our managed API to AutoCAD.

Architecturally ObjectARX applications are closest to AutoCAD's core (in terms of their implementation) so it is really for these modules that developers - whether external or internal to Autodesk - need to spend most development effort when application compatibility is broken.

So why do we break compatibility at all? Well there are a few reasons...

  1. Sometimes we simply want to update API classes, to add new methods etc. While we can add non-virtual methods during an API-compatible release, adding virtual methods changes a module's v-table and breaks compatibility.
  2. We also need to update our internal architecture or use of technology. An example of this is our extensive use of Unicode in AutoCAD 2007. This is a deep - and wide-reaching - change to the way AutoCAD handles strings internally, and has therefore impacted many ObjectARX function signatures.
  3. Finally we also want to take advantage of the latest compiler technology to build AutoCAD. AutoCAD 2000-2002 were built with Visual Studio 6, AutoCAD 2004-2006 were built with Visual Studio .NET 2002 and AutoCAD 2007 was built with Visual Studio 2005. It's important for us to remain on a supported compiler version, in order to be able to get critical issues addressed by Microsoft, but beyond that it also provides us with new development capabilities, such as the possibility to make use of WinForms in AutoCAD and expose a managed API.

The third point has some subtleties: a pure C++ API could (in theory) be version independent, but whenever C-runtime or MFC classes are used in function signatures (or class derivations), then you do become more closely linked to the specific version of the compiler used to build the API provider (i.e. AutoCAD). So while clients of C++ APIs don't automatically need to use the same compiler version as the API provider, applications using ObjectARX do have this requirement.

So why don't we break compatibility every release? Because of the pain felt by our customers, and by developers. Non-availability of applications for a particular release has the potential to impact adoption of that release, as many customers are dependent on an independent application to perform their work. Maintaining a 3-release (which right now means a 3-year) window gives developers more time to focus on driving customer value by implementing serious enhancements to their applications when they are not focusing development effort on migration to support the basic requirements of the new platform.

It's DevTech's job to help minimise our developers' pain on both these fronts, whether when dealing with migration issues or helping explain the additional features and APIs available in a new release of one of our products.

  1. Could I know whether application developed using AutoCAD 2008 32 bit COM object and Visual studio 2003 work on Windows Server 2003? or Does I need to migrate it?.

  2. I don't believe Windows Server is a supported platform for AutoCAD, but if it works then the application should work (unless it's doing something OS-specific, for some reason).

    The devil's in the detail, as ever.

    Kean

  3. Is there any way to make version independent AutoCAD VB applications?

  4. Kean Walmsley Avatar

    Managed (e.g. VB.NET) applications are relatively version independent - they will work as long as the APIs they depend upon have not been changed.

    VB6 applications are also mostly appllication idependent, although I don't remember whether you need to use late binding or not to do so (it's been a while since I created a VB6 app, I have to admit).

  5. Hi Kean,
    I'm looking for a good sample of Late Binding or for a sample of AutoCAD version independent C#-Program.
    Maybe you can help.
    Thanks
    Jürgen

  6. Kean Walmsley Avatar

    Sorry - I tend to avoid Late Binding for performance reasons (whether runtime execution speed or the time it takes for me to code without Intellisense :-).

    AutoCAD .NET applications should be forward compatible - as mentioned in this article - as long as you don't depend on APIs exposed in particular releases.

    Kean

  7. Hi Kean,
    Late Binding is not that think i prefer.
    To solve that problem I must compile my program for each AutoCAD version with the right references. Is that correct?
    Thanks
    Jürgen

  8. Kean Walmsley Avatar

    No, that's incorrect.

    To test this out I just built a simple application referencing acmgd.dll and acdbmgd.dll from the inc folder of the ObjectARX 2007 SDK. It loaded fine and executed a simple command using Editor.WriteMessage() in AutoCAD 2010.

    As long as the API functionality you need is there, .NET should remain forward compatible.

    Kean

  9. OK I take it.
    I reference acmgd.dll and acdbmgd.dll from 2007 and it will run under 2008 and so on.

    Many thanks for your help.
    Jürgen

  10. Nice blog, its great article informative post, thanks for sharing it. Thanks for the information!

  11. Wagner Plais said...
    Hi folks,

    I saw at the ADN website a "Porting ObjectARX Applications" webcast class but I could no find the rocorded video. Can anyone point me the download location.

    Thanks in advance.

    Plais.

  12. Hi folks,

    I have a tough task ahead. I will have to port a ObjectARX 2000 application to ObjectARX 2010 in order to make it run on the new AutoCAD 2010. Could you please folks, give me some hints (or point me some documentation) about the steps that must be taken to accomplish this task.

    Thanks in advance.

    Plais.

Leave a Reply to Rohit Cancel reply

Your email address will not be published. Required fields are marked *