AutoCAD

  • We've been getting some interesting responses back from the AutoCAD Security Survey that has been posted over on the AutoCAD Futures beta forum. (If you haven't already responded, we'd appreciate you taking the time to do so: it'll probably take you less time than reading the rest of this blog post. Then please come back and finish reading this, too. ๐Ÿ˜‰ The survey is intended to gauge whether the safeguards we first introduced in AutoCAD 2013 SP1 (and then further enhanced with the SECURELOAD mechanism in AutoCAD 2014) are properly understood and considered valuable. From some of the feedback we've…

  • In the last post we saw some code to exercise to two available system variable enumeration mechanisms in AutoCAD, SystemObjects.Variables and the new SystemVariableEnumerator class. Today we're going to take a closer look at these two mechanisms, briefly comparing their performance and results. I took some code from this previous post to measure elapsed time, deleting the "runs" database to simplify the code once I'd realised the performance was basically comparable. Here's the C# code, with the updated ESV and ESV2 commands which now create correspondingly named .txt files in c:\temp, rather than printing the results to the command-line (and…

  • On my flight across to Toronto, I took another look at the "What's New in AutoCAD 2015" section of the .NET API documentation and decided to dig into the new SystemVariableEnumerator implementation. I was particularly curious about this feature as there is already a way to get access to system variables via the Autodesk.AutoCAD.Runtime.SystemObjects.Variables collection. As an initial look at these two classes, I decided to put together a couple of simple variable iterator commands that use the same function to print out some information concerning the system variables exposed by each collection. Here's the C# code implementing two commands,…

  • There's been an interesting project on Autodesk Labs for some time, now, called Project Chronicle. It allows you to document use of Autodesk software, whether to provide support, training or โ€“ for that matter โ€“ to blog about it. Anyway, this technology has now graduated from Autodesk Labs and is available as Autodesk Screencast. It seemed like a good time to take it for a spin. Autodesk Screencast is about both creating recordings but also the hosting mechanism required to serve these up. If you go to the web-site you can download the recording tool but also see a gallery…

  • After introducing the series and looking at sample applications for 2D graphics using Paper.js and 2.5D graphics using Isomer, it's now really time to go 3D. We're going to use much of the same code we saw in the last post โ€“ with some simplification as we no longer need to sort the solids by distance โ€“ but this time we're going to feed data into an HTML client app that's fundamentally similar in nature to the one seen in this series of posts using Three.js. I'm happy to have some experience using Three.js, because it happens to be a…

  • After introducing the series and looking at a sample 2D JavaScript application, it's time to go 3D. Well, 2.5D, anyway. We're going to implement a simple sample using the Isomer library that extracts bounding box information about 3D solids โ€“ which could be extended to get more detailed topological information, albeit with quite some work โ€“ and displays them in an isometric view in the HTML canvas. This time we're only going to have a single button in our UI allowing model updates to be refreshed in our isometric view. I decided to leave this as a manual operation, but…

  • Having introduced this series, it's time to look at some code. This first sample shows how to create and host a web-page that uses an external graphics library โ€“ in our case Paper.js โ€“ within an AutoCAD application. The main "trick" to this is going to be getting the data from the HTML page into AutoCAD, which we'll do by extending AutoCAD's shaping layer. Bear in mind that this code will work with AutoCAD 2015, but I can't guarantee it will do so with 2014 (the JavaScript API was very much a "preview" in that release). Something I should say,…

  • During the last week or so I've put together a number of new sample integrations of JavaScript-based technologies with AutoCAD, mainly to form the basis of my proposed AU2014 class but also (obviously) to share here. This first post introduces the series, giving an overview of some benefits โ€“ as I see them โ€“ of adopting this development environment. As I'm sure I've mentioned before, over the years I've had a love/hate relationship with HTML and JavaScript: I'm comfortable working with them but have lived through plenty of frustrating moments. These days, though, I'm finding it to be very different…

  • My good friend and colleague, Christer Janson, was named 123D's Maker of the Day a couple of weeks ago. This post is to congratulate Christer but also to talk about Christer's background at Autodesk and the key role he plays in the AutoCAD team. I met Christer during the second round interview for my first job at Autodesk, back in 1995. I'd flown across to Switzerland for the interview, although the job itself was to be in the UK: it was a couple more years before I managed to move to Neuchatel for the first time. Back then Christer was…

  • I had an interesting email last week from Josh Mathews: I'm having some trouble figuring out how to fix this problem I have and I'm not sure what the best way is to attack it. I have a large set of drawings that have these random strings of underscores strewn throughout the drawing (which look like random lines scattered all around when the drawing is printed โ€“ and make it confusing to look at), and so I'm trying to write a function that will iterate through the drawing and find all the text strings that contain ONLY underscores and then…