September 2012


  • Generating a transient box inside AutoCAD using .NET

    Since posting about the ability to display transient graphics as an ongoing feature that can react to mouse input, I've been thinking of the steps that would be needed to generate a custom gizmo comparable with AutoCAD's viewcube. The post starts to go in that direction by displaying a couple of types of transient graphics in AutoCAD as a "standard" feature: firstly we're going to show screen-fixed text (with code pulled directly from this post) and then we're going to place a a transient box in the drawing itself. This may be pre-cursor to displaying a box-like gizmo, but then…

  • In the last two posts in this series, we introduced the concept and architecture behind the Facecam, and looked at the desktop-based component to build our face recognition database (facedata.xml). In this post we'll take a look at the Raspberry Pi-resident face recognition engine. This component is implemented as a daemon (which is basically the Unix/Linux equivalent of a Windows service, for those unfamiliar with the term) that looks in an "input" folder for images to process and populates an "output" folder with the results of the face recognition process. In the next post in the series, we'll look at…

  • Congratulations to fellow Autodesker, Jeremy Sawicki, on claiming first prize in the ICFP (International Conference on Functional Programming) Programming Contest 2012. In his day job, Jeremy is a fellow software architect on the Revit team, although to win this prestigious competition Jeremy clearly functions at a much higher order (yes, that was actually a functional programming joke, right there ;-). To find out more about the task and Jeremy's solution, watch this video (Jeremy's team – Frictionless Bananas, of which Jeremy was captain and sole member – is introduced at around the 24m mark and talks about his implementation from…


  • Overriding the grips of an AutoCAD polyline to maintain fillet segments using .NET

    Many, many thanks to Massimo Cicognani for contributing the code in today's post. Massimo contacted me as he was working through some issues with his implementation and then kindly offered to share it with this blog's readers. We've looked at a few different types of overrule on this blog, in the past, and even taken a look at a grip overrule or two. Massimo's much more advanced grip overrule works with a very particular type of polyline: those that alternate between straight and arc segments (with the first and last segments being straight). This might sound a touch specific, unless…


  • Creating a face-recognising security cam with a Raspberry Pi – Part 2

    In the first post in this series, we introduced the idea behind the Facecam, a Facebook-enabled security camera running on a Raspberry Pi device. Over the next three posts we're going to look in more detail at the system's components. In this post, we're going to start by looking at the component – the only one that doesn't actually run on the Raspberry Pi – that downloads the information from Facebook to build the facial recognition database to be used by the device. As mentioned last time, I've coded this as a .NET application – actually by extending the WinForms…

  • This question came in by email, last week: I'm trying to reverse the direction of a polyline thought the API, but I didn't find something in the documentation nor in the web. (Even nothing on your blog.) Can you help me? I also didn't find anything in the public API, although that doesn't mean there isn't something I've missed (I seem to be on a bit of a roll in that respect, lately :-S :-). A couple of thoughts/comments on this problem: Ideally we don't want to create a brand new object, as on the one hand there may be…


  • Help for AutoCAD 2013 updated

    For the first time ever (apparently – I don't remember this kind of detail) there has been a mid-cycle update to AutoCAD 2013's online Help system (comparable updates have been made for AutoCAD LT 2013 and AutoCAD Mechanical 2013). The updates include more than just new content – there have been significant enhancements made to the search mechanism, for instance. One feature I think readers of this blog will find particularly helpful is the ability to filter for developer-oriented content: And be sure to "Include Web Results" if you want the results to include content from this blog, of course.…


  • Creating a face-recognising security cam with a Raspberry Pi – Part 1

    This series of posts builds upon the mini-series on building a motion-detecting security cam based around the Raspberry Pi. Once you have your motion detecting security cam up and running, you should be able to move on to the next stage: enabling that system to recognize faces that it has been trained against. My specific project (which I'm calling the Facecam, although I haven't applied for a trademark 😉 pulls data down from Facebook and uses that to train the face recognition system, but that's far from being a requirement: it's also very possible to train the database in other…


  • Creating a selection filter that finds dynamic blocks in AutoCAD using .NET

    An interesting question came in via email from Rob Outman. He's interested in applying a selection filter when the user selects dynamic blocks. This is straightforward for unmodified dynamic blocks – just as with standard blocks, you can filter on the block name very easily – but it works less well on dynamic blocks whose properties have been modified at an instance level. Essentially what happens is this: if you select a block reference to a dynamic block in the AutoCAD editor and then use (for example) the Properties window to edit some of the custom properties associated with that…


  • Creating reactive, transient AutoCAD geometry using .NET

    This is a really interesting topic. At least I think it is – hopefully at least some of you will agree. 🙂 The requirement was to create selectable – or at least manipulatable – transient graphics inside AutoCAD's drawing canvas. As many of you are probably aware, transient graphics are not hooked into AutoCAD's selection mechanism. This is mostly fine, but if you want to implement a ViewCube-like gizmo that manipulates the view or drawing settings in some way, it's hard to do so without the ability to react to the current cursor position is and what's happening with the…