AutoCAD

  • I am really starting to love the new Overrule API in AutoCAD 2010, and I still feel as though I'm just scratching the surface. This question came in overnight from Danny Polkinhorn (thanks, Danny! ๐Ÿ™‚ : It's exciting to see a very usable implementation of 'custom' objects in .NET. Obviously, this implementation protects what could be proprietary business intelligence from being sent around, but it brings up a question. What process would you use to 'explode' these elements so that you could send the drawing to someone without your code, but with the custom elements in it? My first thought…

  • In the last post we looked at some code that attaches additional data to individual entities, allowing them to be drawn independently with different visual properties via the new Overrule API in AutoCAD 2010. A couple of comments โ€“ one from Qun, who provided the original F# sample, and one from Tony Tanzillo โ€“ have prompted me to optimize the code somewhat. Tony pointed out, very validly, that as the previous code registers its overrule against Drawable objects it will get called for every entity (and various objects besides) which could clearly impact performance. Qun pointed me to some interesting…

  • In the last post we looked at some C# code to customize the display of all Lines and Circles within AutoCAD, adding a thickness (or a diameter) to make them look more like pipes. This was, in turn, based on this F# post. The previous code implemented an overrule that allowed us to insert our own graphics for every instance of the types of object we cared about. [A quick note on the previous implementation: we actually register the overrule to be called for all "drawable" objects: the inheritance tree for the Circle class is: Drawable โ€“> DBObject โ€“> Entity…

  • The code in this post is a direct port of the F# code in this previous post, which was entered by Qun Lu in the recent F# programming contest. Someone โ€“ very validly - commented on the fact the post involved both a new language and a new API, which was probably pushing things a little from a learning perspective. ๐Ÿ™‚ Without repeating my various comments in the previous post, I will reiterate the fact that this API is extremely interesting for developers who wish to customize the appearance and behaviour of standard AutoCAD objects without going through the pain of implementing full…

  • In the last post I introduced a very simple "Hello World!" IronRuby application working with AutoCAD, just as I'd previously done with IronPython. My idea for this post was to take the code from my second IronPython post โ€“ which showed how to jig an AutoCAD solid from IronPython โ€“ and get it working with IronRuby, forcing me to learn a little more Ruby in the process. All started out well: to convert the basic syntax from Python to Ruby was straightforward, and I have a definite liking for the syntax of the Ruby language. Especially when working with object…

  • [I've now started pushing links to my posts out through Twitter, even if I haven't gone quite so far as to abandon TypePad (yes, it was an April Fools' joke, in case anyone missed the closing comment :-)]. Having spent some time looking into Python, I decided to give Ruby โ€“ another popular scripting language and one with an "Iron" implementation allowing you to work with .NET โ€“ the same treatment. From what I can tell โ€“ and I'm really a newbie in both these languages โ€“ there is relatively little to separate the two: both Ruby and Python have…

  • The recordings from our recent DevDays Online events, covering API-related information about much of the 2010 family of products, are now available: AutoCAD download (27.3 Mb) AEC download (47.5 Mb) Geospatial download (14.6 Mb) Manufacturing download (27.0 Mb) Civil 3D download (14.2 Mb) Enjoy! ๐Ÿ™‚

  • This post is one of the winning entries of the F# programming contest started at the beginning of the year. It was submitted by an old friend of mine, Qun Lu, who also happens to be a member of the AutoCAD engineering team, and makes use of a new API in AutoCAD 2010: the somewhat ominously-named Overrule API. The Overrule API is really (and I mean really, really) cool. Yes, I know: another really cool API in AutoCAD 2010? Well, I'm honestly not one to hype things up, but I do have a tendency to get excited by technology that…

  • A big thanks to Stephen Preston, who manages DevTech Americas and coordinates our worldwide AutoCAD workgroup as well as spending time working with the AutoCAD Engineering team (phew!), for providing this sample. Stephen originally put it together for our annual Developer Days tour late last year: I took the original sample, converted it from VB.NET to C# and made some minor changes to the code. The VB.NET version is available from the ADN website, in case. The Free-Form Design feature in AutoCAD 2010 is one of the coolest enhancements to the product (I really like the Parametric Drawing feature, too,…

  • After getting my feet wet in the last post with my first IronPython application running inside AutoCAD, I decided it was time to attack a slightly more challenging problem: jigging a database-resident Solid3d object. The idea had come after I'd received a question by email from David Wolfe, who wanted to have a fully rendered 3D view of a cylinder he was jigging. I'd done something similar for a prototype application I worked on late last year (which was demoed at AU). The jig itself only collected the selection data I needed โ€“ the display of the Solid3d objects was…