AutoCAD
-
As promised and reported on, and then announced by Scott on his blog, the QR Codes application for AutoCAD is now live on Autodesk Labs as December's Plugin of the Month. You may have seen my original implementation, but it's come a long way thanks to the efforts of Augusto Gonçalves, a member of DevTech based in São Paulo. While I had developed the original implementation to create and embed raster images using the Google Chart API, Augusto extended that implementation to create native hatches for QR Codes. And while my implementation focused on a command-line UI, Augusto implemented a…
-
I was just easing back into post-AU work – dealing with my email backlog and thinking about possible blog posts for the week – when I received a very welcome email from Philippe Leefsma, a member of the DevTech team based in Prague. Philippe had a bit of time to spare during our annual DevDays tour and decided to polish up a sample he'd been working on for posting. It extends a post of mine from four years ago (I can't believe it's been that long, but anyway), which shows how to jig a polyline with keywords. Philippe adjusted the…
-
I've now checked in for my flight to Las Vegas – and, thanks to Jeremy Tammik's recent troubles, I luckily renewed my ESTA – so I'm pretty much all set for my trip to AU 2010, at least from a travel perspective. I'm just keeping my fingers crossed that the gastric 'flu my kids seem to have come down with doesn't hit me before I leave (or once I'm at AU… what a grim thought). I was going to keep today's post light, just like the last one, but then decided to dip into my email folder of externally contributed…
-
Or perhaps the title should really be "why it's really a good idea to avoid misusing mutable state when using F# Asynchronous Workflows". Ultimately I wanted to share a brief (or not, we'll see), cautionary tale about the dangers of shared state when implementing concurrent tasks. I've been using F# for some time, and have it fairly well drilled into my skull by this point that shared, mutable state is bad. And yet occasionally it somehow creeps in as an expedient way to solve certain issues: perhaps it's just a lack of discipline on my part or the years of…
-
That has to be one of my favourite post titles, to-date: it'll be interesting to see how Twitterfeed handles it. 🙂 In this post we're going to combine the approaches from a couple of previous posts to place source code to generate associative, lofted surfaces on the clipboard, ready for pasting into a C# project. When we did this before for polylines, we didn't really care about grouping them: we could just select all of the polylines in a drawing and they would (hopefully) be reproduced when the generated code was executed in the target drawing. This is a bit…
-
As mentioned a few posts ago, I'm working towards generating a set of surfaces from some polyline profiles, to programmatically create a space shuttle. Most of the surfaces are "lofted", so that seems a good place to start. Today we're going to implement a simple command that creates a lofted surface from three circular profiles. This is based on functionality added in AutoCAD 2011, so apologies to those using prior versions. If anyone's interested in where the term "lofted" comes from, the ever-useful Wikipedia has some information for us: The term lofting originally came from the shipbuilding industry where loftsmen…
-
This handout is for the companion class to the one whose handout formed my last post. While that class was user-focused, this one, "CP322-2 - Integrate F# into Your C# or VB.NET Application for an 8x Performance Boost", is more developer-focused and takes the hood off the implementation of the BrowsePhotosynth application. The code for this special version of the application – which imports synchronously via C# and synchronously/asynchronously via F# – is available here for download. Introduction This class takes a look at the implementation of BrowsePhotosynth for AutoCAD, the ADN Plugin of the Month from October 2010 and…
-
I've been a little slow getting my AU material together, this year (I've been called onto more pressing issues fairly consistently over the last weeks/months), so I'm very much up against Monday's content submission deadline. I'll certainly have the handouts ready, but the presentations will have to come later. As I've done in the past, I like to post my handouts here for people to take a look at (and provide feedback on in time for me to correct prior to the event ;-). Today's post is the handout for my AutoCAD user-focused class, "AC427-4 - Point Clouds on a…
-
A colleague set me a fun little geometry-related challenge a couple of days ago: to write C# and F# applications to make AutoCAD draw lines between a number of points spaced evenly around the circumference of a circle. Here's the first C# version I wrote, which makes use of a function to collect the various points before indexing into the collection from a nested loop: using Autodesk.AutoCAD.ApplicationServices; using Autodesk.AutoCAD.Runtime; using Autodesk.AutoCAD.DatabaseServices; using Autodesk.AutoCAD.Geometry; using System; namespace CircleOfLines { public class Commands { public static Point3dCollection pointsOnCircle( Point3d center, double radius, int n ) …
-
Here's an idea I've been playing around with for some time: say you want to capture geometry as code for pasting back into your application, how do you do it? For instance, sometimes you might want to model geometry using AutoCAD and then capture it as code for later generation at runtime. I have a specific example in mind, of course: I have some boundary loops that can be used to generate the outer shell of a space shuttle using the surfacing capabilities introduced in AutoCAD 2010. I'd really like to use code to store these loops and – in…