AutoCAD 2008 – other new APIs

In the previous two posts we looked at the new ObjectARX samples and the new .NET samples available for AutoCAD 2008.

AutoCAD 2008 also exposes a number of new APIs (and enhancements to old ones) for which we don't have new SDK samples. Take a look of the 'Migration Guide for Applications' for a comprehensive list of new classes and new methods and properties within classes. Check the AutoCAD Managed Class Reference for Managed equivalents.

And once again - let me know if there are any of specific interest to you, and we'll see what we can do. 🙂

Layers per viewport

Complementing the new annotation scaling feature, you can now override layer parameters such as color, plot style, lineweight and linetype on a per viewport basis.

You can also dim layers per viewport, to make the important information stand out.

Multi-leaders

The new Mleader (AcDbMLeader) entity allows you to insert leaders with multiple arrows.

Wipeout

Formerly part of Express Tools, the Wipeout (AcDbWipeut) entity has for a number of releases been part of the standard AutoCAD feature set. In this release we finally publish a fully supported API for this feature.

InfoCenter

The InfoCenter is an integrated search tool allowing the user to search a range of online content, including product helpfiles, the Autodesk Knowledge Base, newsgroup postings, and other autodesk.com information - as well as blogs such as this one :-). InfoCenter feature has a managed API that allows you to integrate your own content with this tool.

Dimension enhancements

We've introduced a lot of dimension enhancements, all of which are reflected in th API. These include Dimension Break, Tolerance Alignment, Inspection Dimensions, and Jogged Linear Dimensions… to name but a few.

Multiline attributes

Attributes can now span multiple lines… enough said.

DWF and DGN Underlays

An underlay is like a raster image, but you can snap to the geometry. AutoCAD 2008 underlays allow you to create geometry based on DWG and DGN files. DWF underlays are represented by the DwfDefinition and DwfReference classes. DGN underlays by DgnDefinition and DgnReference.

Tool palette enhancements

The tool palette API has been extended to include support for user-defined images and drag and drop enhancements.

  1. NAHIED KOOLEN Avatar

    When do I receive autocad2008?
    Can I already download it before the dealer has send the dvd?

  2. Kean Walmsley Avatar

    The specific release date has not yet been announced, as far as I'm aware. I'd suggest checking in regularly with this site:

    http://www.autodesk.com/pre...

  3. WIPEOUT IS APPARENTLY INCOMPATIBLE WITH AUTOCAD 2008 (AT LEAST THAT IS WHAT AUTOCAD RESPONDS BACK WHEN TRYING TO LOAD WIPEOUT.ARX). IS THERE SOME OTHER COMMAND THAT PERFORMS LIKE WIPEOUT?

    ANY HELP WOULD BE GREATLY APPRECIATED.

  4. The WIPEOUT command runs fine on my installation of AutoCAD 2008. It causes acwipeout.arx and acwipeoutobj17.dbx to be demand-loaded.

    Kean

  5. Hi Kean, Thanks for the effort you put into this blog, it's a great resource. I cannot resolve creating a Wipeout in VB.Net for 2008. The follwing code creates a Wipout, but either crashes AutoCAD, or when I move the object get Fatal Error, or the Wipeout doesn't hide objects:
    Dim bt As BlockTable = tm.GetObject(db.BlockTableId, OpenMode.ForRead, False)
    Dim btr As BlockTableRecord = tm.GetObject(bt(BlockTableRecord.ModelSpace), OpenMode.ForWrite, False)
    Call lentWipeout.SetFrom(lcolWipeoutPoints, lvecNormal)
    loidWipeoutID = btr.AppendEntity(lentWipeout)
    tm.AddNewlyCreatedDBObject(lentWipeout, True)
    ta.Commit()
    I have googled for days, so I hope you don't mind.... Dale

  6. Hi Dale,

    How are you creating lentWipeout and populating the points lcolWipeoutPoints?

    Regards,

    Kean

  7. OK - I see you've just had a response via ADN, Dale: I hope this solves your problem.

    Kean

  8. Hi Kean, I have determined my error was in providing only 4 points to the Point2DCollection rather than returning to the first point. No other change was needed. I hope the following code helps someone else. Regards, Dale

    Public Function CreateWipeout() As ObjectId
    Dim loidWipeoutID As ObjectId
    Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database
    Dim tm As DBTransMan = db.TransactionManager
    Dim lentWipeout As New Wipeout
    Dim lvecNormal As New Vector3d(0.0, 0.0, 1.0)
    Dim lpntPoint2D As Point2d = Nothing
    Dim lcolWipeoutPoints As New Point2dCollection() 'this is 2DPoint to suit Wipeout, add Z to suit Line

    lentWipeout.Layer = "0"

    'start a transaction
    Dim ta As Transaction = tm.StartTransaction()
    Try
    Dim bt As BlockTable = tm.GetObject(db.BlockTableId, OpenMode.ForRead, False)
    Dim btr As BlockTableRecord = tm.GetObject(bt(BlockTableRecord.ModelSpace), OpenMode.ForWrite, False)

    'fill 2D Point collection with 4 points
    lpntPoint2D = New Point2d(0, 0)
    lcolWipeoutPoints.Add(lpntPoint2D)
    lpntPoint2D = New Point2d(500, 0)
    lcolWipeoutPoints.Add(lpntPoint2D)
    lpntPoint2D = New Point2d(500, 500)
    lcolWipeoutPoints.Add(lpntPoint2D)
    lpntPoint2D = New Point2d(0, 500)
    lcolWipeoutPoints.Add(lpntPoint2D)
    lpntPoint2D = New Point2d(0, 0)
    lcolWipeoutPoints.Add(lpntPoint2D)
    Call lentWipeout.SetFrom(lcolWipeoutPoints, lvecNormal)

    loidWipeoutID = btr.AppendEntity(lentWipeout)
    tm.AddNewlyCreatedDBObject(lentWipeout, True)
    ta.Commit()
    Finally
    ta.Dispose()
    CreateWipeout = loidWipeoutID
    End Try
    End Function

  9. Hi Dale,

    I discovered the same thing, late yesterday. I'll post my C# code later today.

    Thanks for letting us know,

    Kean

  10. Multiline attributes: Not "enough said"

    If you edit a a block with multiline attributes with multiple text, it strips line feed from text. This made text one long line although Mtext like width is maintain.

    Another "feature"; if the attribute in a block refereance is moved using it's grips, vectors "disapear" till a regen is issued.

    Installing SP2 does not make diffeance.

  11. Your issues seem more related to product functionality than to code I've posted on this blog.

    Please submit your product issues via your reseller or via the appropriate discussion group.

    Kean

  12. thanks for help

Leave a Reply to NAHIED KOOLEN Cancel reply

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