Notification / Events
-
A quick update, today. Last week Jeremy posted a migrated version of the TransTips plug-in for AutoCAD, this time working inside Revit. Thanks to the shared use of AdWindows.dll in both products, this was actually really easy. After this initial version, it made sense to refactor the code to have a core, shared file (not necessarily a separate DLL component – sharing source can give many benefits for smaller projects, such as this) used to build plugin DLLs for both AutoCAD and Revit. Here's the result: a single solution which will build TransTips DLLs for AutoCAD and Revit (including built…
-
One of the great benefits I have from working in our Neuchâtel office is my proximity to a great many talented members of Autodesk's Worldwide Localization team, who are responsible for translating most of our products into various languages. Over the last few months, I've been working even more closely than usual with that team, mainly looking at ways Autodesk might broaden the ability to localize our software. A couple of hot topics are of particular interest, these days, in the world of localization: machine translation and crowdsourcing. The implementation I'll be showing over the next few posts actually hits…
-
To continue on the theme established in the last post, today we're going to go ahead and modify AutoCAD tooltips, prefixing them with a fixed string. This is the next step on the path to modifying them in a more meaningful way (to translate them into a different language, for instance). Here's some C# code that implements a command to prefix all AutoCAD tooltips with a silly string ("Kean says this command …"): using Autodesk.AutoCAD.ApplicationServices; using Autodesk.AutoCAD.EditorInput; using Autodesk.AutoCAD.Runtime; using System.Collections.Generic; using System.Windows.Controls; using System.Windows; namespace PrefixTooltips { public class Commands { List<string> _handled = null;…
-
I'm working on an internal project that seems to be worth sharing externally. I'm looking at the potential for run-time modification (thinking mainly about translation) of tooltips displayed by AutoCAD. The first step towards realising this is clearly to determine when tooltips are going to be displayed and to establish the content of these tooltips. Here's some C# code that does this (written with Visual Studio 2010, so users of prior versions may need to swap out my lambda function for a delegate or even a full event-handler function). You'll also need to include AdWindows.dll in addition to the typical…
-
Another Friday, another installment of Wayne Brill's AutoCAD .NET training DevTV series (to complement those from previous weeks). Today's session is focused on the very useful InputPoint Monitor capability. This series of DevTV sessions is a companion for the new AutoCAD .NET training material available from the AutoCAD .NET Developer Center. Enjoy! 🙂
-
Another Friday, another installment of Wayne Brill's AutoCAD .NET training DevTV series (to complement those from previous weeks). Today's session is focused on responding to database events and creating a palette-based user interface. This series of DevTV sessions is a companion for the new AutoCAD .NET training material available from the AutoCAD .NET Developer Center. Enjoy! 🙂
-
As promised, I ended up burning more that a few hours this evening (after being up very early for meetings this morning), to add orthographic drawing support to the code shown in the last post. It took quite some work, switching between UCS and WCS until my head was more than a little twisted. This thread on The Swamp provided well-needed inspiration, too (thanks, MickD :-). Here's the C# code – I would have highlighted the modified lines in red, but the code is too wide to add 3-digit lines without it looking ugly, and – besides – I need…
-
A big thanks to Norman Yuan for the technique shown in this post. I stumbled across Norman's post on this topic, and decided to take his code and rework it for posting here, with Norman's permission, of course. Very interesting stuff! 🙂 First things first: you probably don't have a burning need to reinvent either the wheel or AutoCAD's MOVE command. That said, this is a technique that may be of interest to many of you, especially if – for whatever reason – you're looking for an alternative to using a jig. The technique Norman has shown uses a combination…
-
I'm up early (after sleeping late) with jetlag, so I thought I may as well put together this post. My brain isn't fully functional, I suspect, so forgive any errors (but please let me know about them, so I can fix them :-). I was inspired to implement the code in this post by an internal email thread, wherein Albert Szilvasy recommended implementing a comparable technique to a colleague. Please don't blame Albert for the implementation details, though, they are all mine. The idea is simple: you have some kind of modeless PaletteSet, and you want to initiate and manage…
-
Just a quick note to say Glenn Ryan's latest contribution, RefUcsSpy, is now live as August's Plugin of the Month. I posted a preview of the application a few weeks ago, and you can now get the compiled plugin with complete source project from the Plugin of the Month page on Autodesk Labs. Thanks, Glenn! 🙂 You'll note the posted plugin only claims support for AutoCAD 2009 onwards. This is because it relies on the Task Dialog implementation introduced in that version of AutoCAD. If you would like to get it working for prior versions of AutoCAD, you'll find an…