AutoCAD 2008 - new ObjectARX samples

The coming posts will look at the various new APIs in AutoCAD 2008. Here is the way I've decided to serialize the information:

  • New ObjectARX samples - this post
  • New .NET samples - the next post
  • Other new APIs - the following post

So this post focuses on the new C++ samples on the ObjectARX SDK for AutoCAD 2008, talking about their corresponding features and APIs. Thanks to Stephen Preston, our DevTech Americas Manager and the presenter you may seen in the previous post, for providing the bulk of this information.

Annotation Scaling

One of the most highly anticipated new features in AutoCAD 2008 is annotation scaling. This new feature addresses the problem of getting annotation elements to display at the same 'paper size', regardless of the scale of the viewport they are displayed in. In the past, users would normally address this problem by adding multiple versions of the same annotations on different layers, and turning those layers on or off depending on the viewport scale. This new feature avoids all that by allowing the user to simply specify the display size of each annotation object for each viewport layer it displays in.

The sample demonstrates how your application and any custom entities it defines can work seamlessly with the annotation scaling feature. Annotation scaling works through Protocol Extensions, but (unlike most protocol extensions) it does require code to be added to your custom entity.

The sample shows how to derive a custom entity from a standard annotative entity and add additional annotative features to it. The standard annotative entities are:

  • AcDbText
  • AcDbMText
  • AcDbHatch
  • AcDbBlockReference
  • AcDbDimension
  • AcDbLeader
  • AcDbFcf

For those of you not interested in custom entities, the sample also demonstrates how to query and manipulate the annotation scales and entities in a drawing.

Table

AcDbTable and its associated classes have been greatly enhanced in this release. They are well worth a look – of particular interest is the increased capacity to link between AutoCAD Tables and Excel worksheets.

We've added additional commands to the existing ObjectARX sample to demonstrate:

  • Creating a data link between a table and an Excel worksheet.
  • Breaking a table (and then restoring it afterwards)
  • Creating a template from an existing table that can then easily be used to set the same style for other tables.
  • Adding multiple content to a single table cell – a mix of blocks and text, for example.

The Table API also includes other formatting enhancements to more fully control the style of the table. These include cell styles, auto-fill, cell tooltips, cell locking, and formulae.

SectionPlane

A section plane allows you to display a section, or slice, through three dimensional geometry in your drawing. The feature was introduced in AutoCAD 2007, and we included a very simple demonstration of the API in the ObjectARX 2007 SDK Surface_Helix sample. To better demonstrate this feature, we've now enhanced the functionality and broken it out into its own sample.

The new sample allows you to define a section plane in your drawing and then walk the section through your geometry, recording snapshots of the section as you go. The snapshots are recorded as block table records. Other commands demonstrate querying section properties.

Material

AutoCAD 2008 has filled in a few of the missing pieces from the 3D-oriented AutoCAD 2007 release. One area we've enhanced is the use of materials inside AutoCAD. Our aim is to provide all the functionality in AutoCAD that previously required the VIZ Render application.

The existing material sample has been extended to demonstrate the use of the new procedural material types – speckle, wave, checker and tile. The sample also expands previous commands to show how to assign materials and landscape materials to a custom entity.

Render

Another enhancement to the AutoCAD visualization functionality in this release is enhanced lighting. (What's the use of all these new materials styles if you can't light them properly? 🙂

This release sees the introduction of parametric lighting, including support for the Illuminating Engineering Society (IES) 'web' file format.

Other features include: enhanced sun and skylight properties; tone operator support for high dynamic range lighting in scenes; and a new look 3D sky background for the interactive viewport;

The Render sample has been extended to demonstrate the use of these new lighting and shadow effects.

Note on VSPROPS:

All our ObjectARX samples have now been updated to make use of common "project property sheet" (VSPROPS) files. These files store common Visual Studio (C++) project properties, which clearly help reduce the effort required to maintain these settings in each of our various samples, as well as demonstrating how to use this useful Visual Studio feature. The relative paths to these property files are hardcoded in the sample project settings, so you'll need to edit them if you copy a sample to a different location. These VSPROPS files (rxsdk_common.vsprops, rxsdk_debugcfg.vsprops, rxsdk_releasecfg.vsprops) are stored in the ObjectARX SDK inc folders.

9 responses to “AutoCAD 2008 - new ObjectARX samples”

  1. DEAR LADIES AND GENTLEMEN,
    I BOUGHT AUTOCAD 2007 AND A.D.T. WITH SUBSCRIPTION AND SO I HAVE THE RIGHT TO GET AUTOCAD 2008 AND ADT2008.
    I LIVE IN HOLLAND.WHEN CAN WE RECEIVE A DVD WITH THE SOFTWARE/
    I CAN NOT USE ADT AT THIS MOMENT BECAUSE THERE ARE PROBLEMS WITH WORKING WITH THE MATERIALS. i UNDERSTAND THESE PROBLEMS ARE GONE WITH THE UPDATE OF AUTOCAD/ADT 2008
    YOURS SINCERELY NAHIED KOOLEN ARCHITECTE

  2. Dear Nahied,

    My understanding is that as a subscription customer you will receive the new products as soon as they become available. Right now they are planned to ship in the spring (the specific date may vary depending on the country/language version).

    Regards,

    Kean

  3. muy bueno

  4. sent me Free Autocad Samples

  5. hi, Im luis is posible create a new object from visual studio 2005 to autocad, for example an a beam, coulum.

  6. You can implement a custom entity to do this, but it's a lot of work. There are a number of samples on the ObjectARX SDK which deal with implementing custom entities.

    Kean

  7. Hello Ken,

    Please have a look into this URL (visualcadd.com/v... this image will explain our product requirement. We have the existing
    application will all the functionality with FoxPro as database access and user interface. Now we are going to enhance the application using AutoCAD (instead of Visual CADD), database SQL server and .NET desktop application (instead of FoxPro).

    For this we are doing the feasible study, what is needed from AutoCAD to integrate the same? And we don't want to do any comprise that AutoCAD functionalities will be integrated with in
    our .NET desktop product. For this we need the perfect solution which one need to go.

    Regards
    Murali

  8. Hello Murali,

    I suggest you join ADN (if you're not already a member) and speak to our local team about this requirement.

    Please send me an email (via the address on my "about" page) and I'll put you in touch with the local ADN Manager.

    Kean

Leave a Reply to murali Cancel reply

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