AutoCAD
-
We have a number of candidate "Plugins of the Month" currently in the pipeline – including Inventor versions of Screenshot and Clipboard Manager as well as a tool to streamline batch plotting from AutoCAD – but unfortunately none were looking ready enough to count on for January's posting. So yesterday I dipped into the plugins that have generously been proposed/provided by external parties and I put together a C# version of a tool submitted by our old friend Jon Smith from COINS. Jon provided a number of C++ tools that COINS has made available for free, one of which was…
-
Thanks to Philippe Leefsma, from DevTech in Europe, for the ObjectARX code that inspired this post. In AutoCAD it's possible to create non-rectangular viewports in paperspace using a variety of closed curve objects: circles, polylines (2D, 3D and lightweight), ellipses, regions, splines and faces. In this post we're going to see some code that creates four new viewports in the paperspace of the active drawing using a subset of these objects: an Ellipse, a Circle, a closed Spline and a closed Polyline. Here's the C# code: using Autodesk.AutoCAD.ApplicationServices; using Autodesk.AutoCAD.Runtime; using Autodesk.AutoCAD.DatabaseServices; using Autodesk.AutoCAD.EditorInput; using Autodesk.AutoCAD.Geometry; namespace ViewportCreation {…
-
I've arrived at the end of my AU+East Asia tour, having spent the last 2 weeks in Las Vegas, San Francisco, Tokyo, Seoul and now Beijing. My blog is blocked by the Great Firewall of China, so while I can post this content via Typepad I can't see the results (although I'm told I should be able to VPN into our Singapore office to bypass this restriction – I'll give that a try, later on). Later today (and today is currently Friday December 11th in China 🙂 you should be able to gain access to the sessions I delivered at…
-
This post was heavily inspired by the code presented by my old friend Albert Szilvasy during his excellent AU class on using .NET 4.0 with AutoCAD. Albert took a different approach to the one I've previously adopted (which turns out also to have been suggested by Albert, when I look back at my original post), and created a palette to host IronPython code inside AutoCAD, enabling the ability to enter code directly in AutoCAD rather than relying on an external text file. In this post we'll take Albert's technique and implement a command-line interface for querying and executing IronPython script.…
-
I've now crossed the international date line (giving up a big portion of my weekend, but that's life) and landed in Tokyo. Tomorrow I head on to Seoul and then to Beijing for the end of the week. In many ways a change of pace from the week in Vegas, but in other ways it's more of the same (fun, that is :-). In this previous post we looked at some code to retrieve and process RSS information from various blogs using an agent-based message passing architecture. The code wasn't completely asynchronous or parallelised, though, as we fired off each…
-
A philosophical question regarding the Layer Reporter tool came up in a recent discussion with Tony Tanzillo. Tony suggested that using XML and XSLT would have been a better way to implement the tool, and in many ways I agree with him (I've been an advocate of XML for many years… during my interview to join Autodesk back in 1995 I presented a session on "Electronic Publishing Formats", which covered HTML generation from SGML – a pre-cursor to XML – and since then I've used XML regularly and on quite significant projects, such as during the redesign of the ADN…
-
For any Autodesk Developer Network members who have not already signed up for AUv, in the upcoming edition of our DevNews newsletter you'll find a discount code allowing you to received a free Premier Pass for AU Virtual (normally worth $99). If you don't know who in your organisation receives DevNews, please send us an email with your ADN number and we'll get you the information. And if you do manage to attend, please do join one of my F# sessions (here are some other AutoCAD-related AUv sessions, and I know Jeremy's also delivering one on Revit families).
-
If you're curious about the AU Virtual experience (perhaps you've signed up and are wondering what it's going to be like, perhaps you're thinking about signing up but would like to know what you're getting into, or perhaps you have no intention whatsoever of signing up but just want to know what 13,000+ other people are going to be doing next week 🙂 then check out this video: And if you end up attending AUv, I'm sure there are plenty of virtual seats left in my F# class! 🙂
-
This is something I've been meaning to attempt for a while, and have finally been spurred to do it by next week's AU Virtual session on F#. Not that I expect to have time to present this during the session (60 minutes is already feeling way too short for the material I want to cover), but I at least wanted to have this working so I could present with a touch more authority. 🙂 In last year's session we used Asynchronous Workflows to improve the performance of IO-bound operations, such as retrieving multiple RSS feeds and displaying the results in…
-
A comment on the code posted in the last post regarding the upcoming Plugin of the Month for the month of December, Layer Reporter, gave me some pause for thought. Tony Tanzillo suggested that making more complete use of the StringBuilder object – rather than direct string concatenation using "&" – would improve the performance of the plugin. As I mentioned in my own comment, Terry's original code did make heavier use of the StringBuilder, but while adjusting the HTML output to make it lighter-weight I introduced a number of string concatenation operations: looking back there were several that weren't…