New APIs in AutoCAD 2009

I've been taking some time this week to dive into some of the new APIs available in AutoCAD 2009. I'm going to post a very quick overview of the APIs available in this post, following up with a more in-depth look at some of the individual APIs in posts over the coming weeks.

I've used material presented at our most recent ADN Developer Days tour as a source of information (a big thanks to Fenton Webb, from DevTech Americas, who was largely responsible for developing this content).

Before talking about the new APIs, the first thing to note is that AutoCAD 2009 is a binary application compatible release with AutoCAD 2007 and 2008. Check out this previous post for information on our typical application compatibility schedule for AutoCAD. So while you will need to modify the demand-loading information to be stored under the correct Registry key (17.2), no changes should be needed to your application's modules.

AutoCAD 2009 has been built with Visual Studio 2005 SP1, but if you require compatibility with AutoCAD 2007 or 2008 for your ObjectARX application, you should continue to build it with Visual Studio 2005 RTM. If you use the .NET API for AutoCAD (or COM, for that matter) you will not need to worry about the version of the compiler.

Here are the major new APIs available via .NET and ObjectARX for AutoCAD 2009. I've listed the .NET namespace, where one exists, or have otherwise listed the API as "ObjectARX-only".

  • User Interface enhancements
    • Ribbon Bar, Menu Browser, Task Dialog, Tooltips
    • Implemented using the Windows Presentation Foundation (WPF)
    • Autodesk.Windows
  • Quick Properties
    • The feature uses existing static and dynamic COM properties for objects
    • New COM interfaces for more control
      • IFilterableProperty, IFilterablePropertySource, IFilterableMultiplePropertySource, IFilterableSubtypePropertySource
  • Transient Graphics
    • More flexible handling of all kinds of transient graphics
    • Autodesk.AutoCAD.GraphicsInterface.TransientManager
  • 3D Navigation
    • Control over the new 3D navigation controls in AutoCAD
    • ViewCube / Steering Wheel / ShowMotion
    • ObjectARX-only
  • Data Extraction
    • Easily extract AutoCAD object properties
    • Autodesk.AutoCAD.DataExtraction
  • In-Place ActiveX Control
    • Embed AutoCAD 2009 inside an ActiveX container
      • Web-page, Office document, WinForms application, etc.
  • InfoCenter
    • Enhanced InfoCenter API
    • Autodesk.AutoCAD.Windows.InfoCenter
  • Geo-Location
    • Allows mapping of AutoCAD drawing units to real-world geography
    • Autodesk.AutoCAD.DatabaseServices.GeoLocationData
  • Material Map
    • Opt out of using texture filtering during render
    • Autodesk.AutoCAD.GraphicsInterface.MaterialMap
  • Boundary Representation
    • .NET wrapper for the ObjectARX API
    • Autodesk.AutoCAD.BoundaryRepresentation
  • Associative Dimensioning
    • New API for an existing feature
    • ObjectARX-only
  • Permanent object deletion
    • Allows actual deletion of erased objects
    • ObjectARX-only
  • New ObjectARX smart pointer
    • Avoids open conflicts
      • Allows optimized opening, returns existing opened objects
      • Including open for write!
      • Allows opening for write on Locked Layers
    • AcDbSmartObjectPointer protocol-compatible with AcDbObjectPointer
    • ObjectARX-only
  • New events & reactors
    • Many new notifications, including:
      • Annotation Scale, Regen, ViewCube, Steering Wheel, Ribbon events...

Last but by no means least, the ObjectARX SDK for AutoCAD 2009 includes a brand-new AutoCAD .NET Reference. It's really nice!

ObjectARX 2009 Managed Reference

By the way, this is my first post created using Windows Live Writer. It seems like quite a handy tool, so far.

11 responses to “New APIs in AutoCAD 2009”

  1. hi kean,

    do you have an example of making use of the geo-location functionality? in germany, it appears that gauss-krueger coordinates are very commonly used, for instance when building tunnels. these cause huge coordinates, and this causes precision problems when calculating and comparing geometry in autocad. maybe this new geo-location functionality could help alleviate these problems?

    cheers

    jeremy

  2. Jeremy -

    No, I don't have a sample, but if you want to work on one, I'll post it for you. 🙂 Unfortunately I don't know whether the Geo-Location feature addresses those precision issues.

    (For those of you who don't know Jeremy, he's a member of the DevTech team in Europe.)

    Zolee -

    Yes, but it's a first step. The plan is to integrate more and more samples directly into the reference. Incidentally, the existence of samples doesn't automatically make it a Developer Guide, which is typically more a step-by-step guide for creating certain types of application functionality.

    So this reference will definitely grow over time, and potentially will be completed by wiki-style community documentation (what this space).

    Regards,

    Kean

  3. Thanks for providing us with the info!

    Looking forward to the in depth look at some of the APIs.

    I'd like to see more on the ribbon, .. using the API do you think we will have the ability to create a second Ribbon to dock elsewhere for our custom apps/code.

    I kicked your post over to :
    cadkicks.com/adkauto...

  4. I don't believe so: my understanding is that the API, as exposed, is more about working with the single Ribbon inside AutoCAD.

    This type of UI functionality may well be in other applications of ours, over time, but I don't see the underlying framework being made available to be used freely in standalone applications.

    Kean

  5. Markus Hannweber Avatar
    Markus Hannweber

    Hi Kean,
    because of some trouble we have sometimes with the large coordinates, I told this to Jeremy and he has written it here.
    The new class AcDbGeoData sounds interesting, but till now I didn't founnd an example.
    But the point, that don't sound good is:
    "AcDbGeoData also provides coordinate transformation functions to convert coordinates between DWG drawing space and geographic space."
    If I have still a coordinate conversion, I think the problem with the precision stays the same
    Greetings
    Markus

  6. Kean Walmsley Avatar

    Hi Markus,

    We'll see if we can come up something you can use to test this issue again (please continue to work with Jeremy). As you've said, if it's largely about coordination transformation I'm doubtful it will be of much help in this particular scenario, but then you never know.

    Regards.

    Kean

  7. Markus Hannweber Avatar
    Markus Hannweber

    Hi Kean,
    the problem here is, that it's really hard to know when it works, because the bugs with the large coordinates show up not very often (but still too often). But we will see

    Greetings
    Markus

  8. To Jeremy:

    Jeremy, I guess you are attempting to use GeoLocation to transform coordinates from Gauss-Krueger to WGS84 (and vice-versa). It's simply up to setting proper transformation parameters - coordinates (neither their precision) themselves don't have much to do with this issue. Autodesk has been using Mentor library within MAP to enable coordinate transformation services. Mentor library is open source now, I guess. Other popular open source library targeting coordinate transformation and reprojection is PROJ4.

    Regards,
    Maksim Sestic

  9. Joseph Garrett Avatar
    Joseph Garrett

    "2009 is a binary application compatible release with AutoCAD 2007 and 2008"

    so we should NOT have to modify/recompile our 2007 based arx/dbx/.Net applications for them to work in 2009?

    I have verified this with '08 but I am having currently troubleshooting an issue with '09.

  10. Kean Walmsley Avatar

    That's correct: if modification or even recompilation is needed, then we need to be aware of it (ideally having it reported through ADN support).

    In a very small number of cases some changes are needed (usually because "incorrect" code happened to work before but not in the latest release - it's rare, but does happen, which is also true of genuine compatibility issues).

    Kean

Leave a Reply to jeremy Cancel reply

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