AutoCAD

  • I might also have called this post "Overruling AutoCAD 2010's entity display and explode using Boo", as it complements the equivalent posts for C#, F#,  IronPython and IronRuby, but I felt it appropriate to combine the post with an introduction to what Boo is all about. What is Boo and how did I come to look into it? Knowing of my recent interest in the various scripting technologies being made available for .NET, a colleague at Autodesk recently pointed me at the Boo programming language (and here is the official page for the language, including its various downloads). First, to…

  • As mentioned in this previous post, where I gave the same treatment to IronPython, I've been trying to get display and explode overrules defined in IronRuby working properly in AutoCAD. IronRuby is still at version 0.3, so this effort has been hindered by a number of CLR interop bugs (it turns out). I finally managed to work around these issues thanks to Ivan Porto Carrero, who is just finishing up his book, Iron Ruby in Action, and has been working with IronRuby since pre-Alpha 1 (brave fellow). Ivan's help was invaluable: he ended up downloading and installing AutoCAD 2010 to…

  • I've been meaning to get to this one for a while. This post takes the OPM .NET implementation and shows how to use it to allow modification of data persisted with an object: in this case we're going to use the XData in which we store the "pipe radius" for the AutoCAD 2010 overrule sample we've recently been developing. To start with, I needed to migrate the OPM .NET module to work with AutoCAD 2010, which meant installing Visual Studio 2008 SP1. Other than that the code migrated very easily, and the project (with the built asdkOPMNetExt.dll assembly) can be…

  • It's quite common for AutoCAD developers to use Extended Entity Data (XData) to tag objects their application cares about. This is certainly the approach taken in the recent series showing how to overrule the graphics display for an object – we store a "pipe radius" in XData attached to the Line or Circle we want to have a 3D profile. That's fine, but what if we're storing a unique identifier with an object in XData that we do not want copied with the object? The Overrule API in AutoCAD 2010 allows you to hook into the DeepClone of an object…

  • My team is trying out a new concept over the coming months, something we're calling DevLabs. The idea is that we schedule a period where members of my team are available in a particular Autodesk office to sit down with people working on their development projects. (The concept is new for us, at least: I know Google does something similar with their Hackathons.) Attendees can plan on dropping in for a just a day or for longer – even the whole week, if they so choose - to spend time working through development issues with members of my team. This…

  • A huge thank you to Zeljko Gjuranic for providing this code for a guest post. The code is based on a paper of Zeljko's that was published in issue 11 of KoG magazine. The original paper is available in Croatian with an abstract in English. The code in this post asks the user to select a set of points and then creates a polyface mesh by using Delaunay triangulation on those points. [As we're creating a polyface mesh we're limited to 32,767 vertices. This is a known limitation when using the PolyFaceMesh object: with the new SubDMesh object in AutoCAD…

  • To continue my investigations into IronPython and the fun I'm having with overrules, I decided to to port my most recent C# overrule implementation across to IronPython. I've also been trying to do the same for IronRuby, but – so far – without luck. Please refer back to one of the previous IronPython posts for the PYLOAD command implementation needed to load our Python script into AutoCAD. Here are the contents of our .py file: import clr path = 'C:\\Program Files\\Autodesk\\AutoCAD 2010\\' clr.AddReferenceToFileAndPath(path + 'acdbmgd.dll') clr.AddReferenceToFileAndPath(path + 'acmgd.dll')   import Autodesk import Autodesk.AutoCAD.Runtime as ar import Autodesk.AutoCAD.ApplicationServices as aas import…

  • As mentioned in a comment on a recent post, Stephen Preston, our DevTech Americas Manager, has put together a useful tool and accompanying DevTV session to help people migrate their VBA code to VB.NET. The resultant code uses COM Interop to call into AutoCAD. AutoCAD VBA to .NET Migration Basics view download (44.3 Mb) Stephen considers this presentation, and the migration tool itself, to be in draft form. If you have feedback, please do send Stephen an email.

  • This post is a miscellaneous update on things I've put off announcing because of all the fun I've been having with AutoCAD 2010's Overrule API. First up is the AutoCAD Exchange, a new site devoted to people working with, you guessed it, AutoCAD. It's stocked with lots of useful and fun content, as well as providing social networking capabilities (be sure to add me as a contact via the Networking area of the site). Next is Without a Net, a blog hosted by an old friend of mine, Tom Stoeckel, along with esteemed colleagues Tom Bradley and Dan Scales. They…

  • Sorry if the title is a little abrupt, but it seemed too good an opportunity to show off my now appalling poetry skills. [Something almost no-one knows (well, OK, knew) about me is that, at the age of 8, I was the youngest winner of a poetry competition. I went along to the King's Lynn Arts Centre (known back then as The Fermoy Centre) to recite my poem, "Words Inside my Pencil", to a packed – at least it seemed so, at the time – audience of the various winners' parents. Anyway, as you can see it was all downhill…