AutoCAD

  • In this previous post, we saw some of the issues around executing standard Python code to de-skew raster images inside IronPython (and the effects those differences can have on the results). In this post, we're going to build the ability to execute our Python code from a .NET module loaded inside AutoCAD with the help of IronPython. The next step will be to add in an HTML5 user interface that calls into AutoCAD using the JavaScript API introduced in AutoCAD 2014. Things have changed a bit since we first saw IronPython inside AutoCAD, most notably the additional of the dynamic…

  • As part of the project I'm working on to deskew perspective images and insert them as RasterImage entities inside AutoCAD, I spent quite some time migrating pure Python code – a good deal of which I had to create for various assignments as part of the linear algebra class I've now finished – for it to work inside IronPython. For those of you who aren't familiar with it, IronPython is a variant of Python that works with .NET via the Dynamic Language Runtime. Making it really easy to integrate with AutoCAD. The code as it stood previously was working inside…

  • I'm sitting at Geneva airport, waiting to board a Swiss flight to the UK. I've been hacking away in Python – and now IronPython – for the last few days, which has been very interesting. Here's a quick update on that… I'm now managing to save out PNGs of the de-skewed portions of perspective photographs with a high degree of quality, if not with exceptional speed. I'll post a little on the approaches I tried out – and settled on – when I get the chance. It's now time to get the code working inside AutoCAD: I have the basic…

  • A picture is worth a thousand words, so whatever your feelings about infographics this must be worth at least a hundred. 😉 Lots of people are participating in the previously announced Exchange Apps Portathon. You have 3 weeks until it starts, so it's a good time to consider joining the fun. Here's a note from Jim Quanci and Stephen Preston, describing the value of the event: At the risk of repeating what's already been said: curated online marketplaces are becoming the preferred way for software users to find add-on functionality. This is also true of Autodesk software, with a million…

  • I've managed to find the time to make good progress on my linear algebra class, which means I have an update to share on the image deskewing project I mentioned last week. Thanks to all of you who provided comments on that post, by the way: there's some really valuable information there. The current implementation has been developed in Python and runs completely separately from AutoCAD. Here's my rough integration plan to get it working in an AutoCAD plug-in: Adapt the code to make sure it can easily be applied to other images. Remove any dependencies that might stop the…

  • As I started on my linear algebra class, some weeks ago, I decided to dust off the Transformer app I'd written a few years ago and make sure it works in AutoCAD 2014. It actually really helped me in creating appropriate transformation matrices for certain parts of the course. Coincidentally, a few days ago, I received an email from a colleague – who isn't a programmer but seems to be working on a very interesting side project – who was interested in taking matrix input from an external system and using that to transform AutoCAD geometry. This colleague wanted the…

  • Augusto Gonçalves – from the ADN team based in São Paulo – asked me to post a quick note advertising an upcoming AutoCAD .NET training he's delivering in Mexico City on September 2-3, 2013. The class is free to attend and will be delivered in Spanish. Here's a description of the training class in Spanish and a link to the registration page.

  • This request came in a few weeks ago regarding the source code for the recently posted DGN clean-up tool: Would you modify the tool so that it can be processed by the equivalent figure ObjectDBX (of course for AutoCAD, not RealDWG)? I would like to give the Database object to the function, and the tool would have to process them in batch (a tool for loading drawings on my side). It seemed like a reasonable enough request, so I spent some time putting together a version of the code that can be used on non-editor resident drawings. I changed the…

  • I'm just back from a relaxing week spent in Ried-Brig and Valsesia, two very interesting – and in many ways similar – Alpine locations in Switzerland and Italy respectively. We were travelling with close friends of ours – she's from Ried-Brig, he's from Valsesia – which meant the week was packed with interesting (and usually "off the beaten track") activities. For instance, here's a panoramic photo I shot from the top of the Sacro Monte in Varallo. Next week I'll be taking some time off to spend with old friends who are visiting from the UK, but in the meantime…

  • In case you missed it, last week Scott Sheppard announced the availability of a new version of DesignScript on Autodesk Labs. This release unveils DesignScript Studio which brings a visual programming environment to the DesignScript language. People who are familiar with Rhino Grasshopper or SoftImage's ICE will be aware of the benefits of working with a graphical tool for mapping associations and flows of data. I personally prefer working directly in code, myself, but there are certainly times when this kind of tool can help unravel complexity. The other primary feature is a new lightweight OpenGL-based script execution tool that…