JavaScript

  • In the last post we looked at some simple JavaScript code to automate AutoCAD's UI Finder, locating a sequence of commands in the ribbon. In this post we're going to look at how to generate a more extensive list directly from AutoCAD's documentation. The first step I took was to download and install the offline help for AutoCAD 2016. This gives us a set of HTML and JavaScript files in a local folder (c:\Program Files\Autodesk\AutoCAD 2016 Help/English/Help on my system). To parse the files I ended up using some old-school UNIX commands via my OS X environment (which shares the…

  • On my flight back from Singapore I started thinking about how an app might help people discover what's new in the AutoCAD UI from release to release. This might also work for custom functionality, but that's not (currently) my main concern. I was thinking of displaying some kind of palette that cycles through the new commands and features in a release, highlighting the associated ribbon buttons, etc., using the AutoCAD help system's excellent UI Finder capability. Over the weekend I started looking at how it might work – whether it was possible to call the UI Finder from an app…

  • The countdown for Autodesk University 2015 starts with the Call for Proposals opening on April 22nd. It will remain open until May 26th. I have a few ideas for possible topics to present at this year's event… Virtual Reality using Autodesk's View & Data API Developing JavaScript applications for AutoCAD using TypeScript Processing drawings in the cloud using AutoCAD I/O They all seem to be valid topics, but we'll see if I can find the energy and motivation to submit all three. If you have an opinion on what you'd like to hear me talk about – even if you…

  • I'm making the most of a late flurry of snow in the alps, this week, finishing up the winter season on the slopes with my family. And I'm going from the snow to the sun next week, as I head across to Singapore for some internal planning meetings. I do expect to blog pretty much as usual, during the course of these two weeks, though (I've still got too much to talk about regarding AutoCAD 2016, for one thing). A topic that I wanted to share today is regarding a MOOC I'm currently following via edX. It started last week…

  • I'm excited to announce the newest member of the Autodesk product portfolio, Autodesk SoCap. The term "SoCap" stands for "Software Capture", in much the same way as ReCap stands for "Reality Capture". SoCap is a tool that helps you capture existing software behaviour as code, just as ReCap helps you capture a 3D scene as a point cloud. For SoCap to do its thing, you point it at the piece of software whose behaviour you want to capture – whether desktop software on Windows/Linux/OS X, mobile software targeting iOS/Android* or the URL of a cloud-based app – and SoCap will…

  • After yesterday's fun with creating an HTML5-based progress meter for AutoCAD, today we're going to have some more fun styling it with CSS. To recap, here's the progress meter that comes "out of the box", with the default styling from Chromium on Windows. The first thing we need to do for our various changes is to use CSS to disable the default styling, at which point we can then use CSS to override it.       progress {         width: 100%;         -webkit-appearance: none;       } Here's how our progress meter looks when unstyled: Now that it's stripped bare, we can…

  • This week I've spent quite a bit of time looking into future API features. For one of them I needed to create a progress meter, and thought to myself "why not create one in HTML5?" And as it's nothing specific to a future product release, I decided to go ahead and post it now. For context, here's the way AutoCAD's standard progress meter currently looks, displayed using the code from this previous post: So why would you go head and create your own progress meter? A few different reasons come to mind… yes, AutoCAD has its own, but perhaps you…

  • My esteemed colleagues over in the ADN team, Philippe and Balaji, have been working their magic, creating samples to show how to make use of JavaScript-based physics engines within Autodesk software. They've inspired me to have a go myself. Philippe's sample – which carried on from his preliminary research into JavaScript-based physics engines – shows how you can integrate ammo.js with the View & Data API to add some gravity to an A360 model. Really fun stuff! [Side note: I love that ammo.js stands for "Avoid Making My Own physics engine" as well as being an emscripten port of the…

  • After introducing this series in the last post, today we're going to address the first 3 items on our TODO list: The initial blue text The theme music The star field The disappearing Star Wars logo The crawling text The following two items are fairly significant, in their own right, so they'll each take a post of their own to complete. Oh, and I've thrown in a surprise item 6, which I'll unveil when we implement the crawling text. Before we dive in, it's important to make some points about the code: because this is mainly just a bit of…

  • Thank you for your readership and support during the last year. It's really the interactions with this blog's readers that motivate me to keep posting after 8½ years. As a small gesture of appreciation, here's a simple HTML card that serves up random posts from this blog's first 1,220 (or so). If you're not interested by the post it shows when it loads, just click on the "Merry Christmas!" banner until you find one you feel like reading. The provided link will launch the post in a separate browser tab. In case you're interested in the implementation details, the shadow…