Runtime

  • When I was a boy, I used to love going to play with toys at my grandmother's house. My absolute favourite was a die-cast Batmobile made by Corgi in the UK. What I particularly liked about this toy was its hidden features: the cars apparently came with secret instructions, although these were nowhere to be seen by the time I started playing with it. The Batmobile had plastic flames that came out of the exhaust when the rear wheels turned and spring-loadable, vertical rocket launchers. The biggest surprise was when I discovered the cutting blade that popped out of the…

  • After introducing the series and looking at the additional code needed for a .NET CRX app to work with AutoCAD I/O, in this post we're going to go the extra small step to prepare the Autoloader manifest, getting it ready to create the Activity and its AppPackage. To simplify the process of developing this app, I recommend a couple of things: download the sample on GitHub I pointed you at, last time – whether by cloning the project or downloading it as a ZIP – and make modifications directly to that. To build the sample I'm creating, for instance, you…

  • Yesterday we introduced the need to sign program modules for AutoCAD 2016. Today we're going to see how AutoCAD behaves when loading signed and unsigned modules, as well as what the innards of a signed LISP module look like. Here's a simple piece of AutoLISP code that I've placed in a file called c:/temp/MyModule.lsp: (defun c:test()   (princ "\nThis is a test command.")   (princ) ) Here's what AutoCAD displays when we try to load this module: We can use AcSignApply.exe to sign this module with our digital certificate, as we discussed yesterday: Here are the contents of the file…

  • This series of posts is one I've been meaning to write since AutoCAD 2016 started shipping. Thankfully a number of other people have filled the void, in the meantime, so I've created an appendix of related posts that you can find at the bottom of each post in this series. The series is about how we're working to improve security inside AutoCAD, and what this means for application developers. Dieter's posts on Lynn's blog help explain some of the background to this work, much as I've posted here in the past, too. Perhaps the biggest security change in AutoCAD 2016…

  • It's time to start looking in more detail at some of the new API capabilities in AutoCAD 2016. To give you a sense of what to expect in terms of a timeline, this week we'll look at a couple of uses for DocumentCollection.ExecuteInCommandContextAsync() and next week we'll look at point cloud floorplan extraction and (hopefully) security and signing. The first use of ExecuteInCommandContextAsync() I wanted to highlight was one raised in a blog comment a couple of months ago. The idea is simple enough: we want to be able to launch a command reliably from an event handler, in our…

  • After our quick look at AutoCAD 2016 from a user perspective, let's now spend some time looking at the things important to developers in this latest release. Compatibility Off the bat it's worth stating that AutoCAD 2016 is a DWG compatible release: it's using the same file format as AutoCAD 2013, 2014 and 2015. It's also a binary application compatible release: ObjectARX apps written for AutoCAD 2015 should work in 2016 and it's likely that .NET apps built for AutoCAD 2014 will work, too. That said, some changes have been made to the security model for this release of AutoCAD,…

  • In this post we're wrapping up this mini-series on docking, which is part of a much broader story arc around a "command-line helper" tool, of course. But then we're reaching the end of that, too, I suspect, as the app's just about done. Hopefully it's ready for posting to Autodesk Labs, at least. Last time we added right-click dragging to allow our keywords window to be moved around without interrupting the active command. Now we're taking it a step further to preview docking at one of the four corners of the drawing window, as well as to actually dock the…

  • I'm happy to say that the implementation I mentioned in the last post ended up being pretty straightforward. Which is actually great, as I have some important posts to work on for next week. 🙂 Today we're going to take a look at the next stage of the "command-line helper" implementation: basic right-click movement of the global keywords dialog, so we can set a custom location for the dialog without needing to use the KWSDOCK command. Here's the code in action: The main work for this stage was to add support for right-click, mouse move and right mouse-button up events,…

  • Today we're going to look at the implementation talked about in the last post: we're going to see how it's possible to use the Application.PreTranslateMessage() method to hack AutoCAD's message-loop and basically convert typed keywords into global ones. This is actually pretty neat (yes, even if I do say so myself 🙂 and frankly I'm surprised it works. Here's the overall approach: Track the characters typed into the command-line Add individual characters into a list Backspace removes the tail of the list Arrow-keys invalidate the tracking: if the user accesses entries in the command-history we can't deal with that, and…

  • This post carries on from this series from a couple of weeks ago: Adding a global keyword menu to AutoCAD using WPF – Part 1 Adding a global keyword menu to AutoCAD using WPF – Part 2 Enabling global commands on localized AutoCAD versions using .NET The overall goal behind these posts was to create a "command-line helper" tool to make it easier for people who know the English version of AutoCAD (or an AutoCAD-based vertical) to work with a corresponding localized version. Basically because some people learn AutoCAD using an English version – perhaps during their studies – but…