User interface
-
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…
-
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…
-
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,…
-
During the course of this week we're going to look at extending the command-line helper sample posted last week by allowing our global keywords window to "dock" to the four corners of the drawing window as well as to remain fixed at a custom location somewhere on the screen. I use the term "dock" here loosely, as we're really just placing it in one of the corners of the drawing window. If we wanted a modeless dialog that was properly docked into AutoCAD then we'd almost certainly want to use a PaletteSet. Here's a quick video demonstrating the KWSDOCK command,…
-
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…
-
After introducing this project in the last post, now it's time to share some code. The project, as it currently stands, contains three source files: the first one relates to AutoCAD – it implements the various commands we'll use to attach event handlers to tell us when to display (or hide) keywords and the other two files relate to the UI we'll use to display them. We're going to use an invisible window which has a child popup containing a listbox of our keywords. Here's the application in action – for now in English AutoCAD, as that's what I have…
-
I'm up in the mountains, supposedly on vacation, but as one of our children woke up with a fever, I'm skipping the morning session on the slopes to stay home with him. Which gives me the chance to start writing up a little project I've been working on for our Localization team. Here's the idea… apparently it's relatively common in certain countries for AutoCAD users to learn the product in English but then end up working with a localized version of the software. While it's always possible to use global commands and keywords by prefixing an underscore, it's not always…
-
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…