Category Archives: Win

AutoCAD 2012 – Autoloader mechanism for plug-ins

One of the less obvious features introduced by AutoCAD 2012 is the Autoloader mechanism that has been provided to make installation of plug-ins (current standard Autodeskspeak for add-ons, apps, utilities, routines, etc.) easier for both developers and users. It may not be immediately obvious, but it’s a useful and important addition.

This mechanism has nothing to do with the AppLoad command, the Startup Suite, acad*.lsp, the (autoload) function or anything else that existed in earlier releases. This is completely new, it has not replaced or broken any of the existing loading mechanisms, and is, in short, A Good Thing. Developers don’t have to use it, but those who do, and their customers, will have certain advantages. I have used it for the ClassicArray loading mechanism, and I expect to see it used by more and more plug-ins over time. It works fine with all of the usual AutoCAD add-on APIs, including LISP.

User perspective
As a user, what this means is that for AutoCAD and related applications from 2012 on, there is a standard loading mechanism for plug-ins. The installation should be straightforward, with no multi-step processes to go through for different AutoCAD variants and releases. The result of the installation should automatically present itself in a standard way, with a short-lived welcome bubble, an extra panel in the new Plug-ins Ribbon tab, plus any other interface additions the developer wants to provide. If you subsequently install another AutoCAD variant or release, the plug-in will automatically appear in that variant with no further user action required, as long as that AutoCAD variant is supported by the plug-in.

Developer perspective
What this means for me as a developer is that I have much less to worry about in terms of installation. All that needs to be done to make the loading happen is for a folder full of ‘stuff’ to be copied into a certain location. (There are actually two possible locations, but more on that later).

In Betas of ClassicArray, I just provided the folder, plus instructions that asked the user to copy that folder into place. I could have simplified that further by providing batch files that did the copying. In the end, I created setup executables using the free Inno Setup utility, but that was a much easier job that it would have been if this Autoloader mechanism didn’t exist. I didn’t have to worry about discovering what releases were installed, deciphering Registry entries, creating user installaton scripts, or issuing instructions to users to edit files or mess with the AppLoad command. I don’t have to worry about what happens if the user subsequently installs another AutoCAD variant.

Of course, for developers who support releases prior to 2012, there is no less work to do than before, and some time needs to be spent to learn and implement the new mechanism. In the case of ClassicArray, that was not an issue because it’s only needed and supported in 2012. I expect this is one of those problems that will resolve itself over time as developers adopt the new mechanism.

The bundle folder
So what is this ‘stuff’ that needs copying into place? It’s called a bundle folder. It’s just a folder with a name that ends in .bundle (e.g. ClassicArray.bundle), and it typically contains the usual files needed to run your add-in, often tidied up within other folders. The only new thing that it needs to contain is a file called PackageContents.xml. That XML file is the key to the Autoloader mechanism. AutoCAD finds the file, reads it, and acts accordingly in terms of version support, loading program files, partial cuix files and so on.

Bundle folder location
So where does this folder with its XML file have to go? There are two possible locations. If you want the plug-in to be available to all users on the computer, you place it in the Autodesk\ApplicationPlugins folder underneath the system’s ProgramFiles folder. For example, ClassicArray usually gets put here:

C:\Program Files\Autodesk\ApplicationPlugins\ClassicArray.bundle

If you only want the plug-in to be loaded for the current user, it goes in the Autodesk\ApplicationPlugins folder underneath the system’s AppData folder instead, for example:

C:\Documents and Settings\[login]\Application Data\Roaming\Autodesk\ApplicationPlugins\ClassicArray.bundle

in XP or

C:\Users\[login]\AppData\Roaming\Autodesk\ApplicationPlugins\ClassicArray.bundle

in Windows 7.

Describing the contents of that all-important XML file is beyond the scope of this post, but I may do a follow-up post if there is enough interest. In either case, the reference material is available in the AutoCAD Help, under Help > Customization Guide > Introduction to Programming Interfaces > Install and Uninstall Plug-In Applications > PackageContents.xml Format.

Fencing at the Commonwealth Championships

This blog has been a bit quiet over the last couple of weeks, as I have had other things to occupy me. I have recently returned from the Commonwealth Fencing Championships 2010 which were held in Melbourne from 30 September to 5 October. There, I was representing my country in the veteran (over-40) events. Which country? Read on.

Fencing is one of the few sports to have featured in every modern Olympic Games, but at Commonwealth level it has been held separately from the main Games since 1970. Although not part of the Commonwealth Games currently being held in Delhi, fencing is a Commonwealth-recognised sport and the Commonwealth Fencing Championships is a sanctioned event. It is a fairly large event, with representatives from 15 nations. There were 51 fencers in the England squad alone.

England Squad

You may recall me mentioning my participation in August’s Western Australian International Tournament, where I managed to snag a win in Veteran Men’s Sabre and a third place in Veteran Men’s Foil. At that time, several people raised with me the possibility of national representation. After some thought and with the support of my family, I nominated for Australian selection in Veteran’s Sabre at the Commonwealth Fencing Championships, where there were still a couple of places available. However, I was eventually knocked back and others were chosen for those places.

Not entirely content with the way in which this had been handled, and with just a couple of days to go before the deadline for entries, I contacted England Fencing. That organisation was happy to find me a last-minute spot in the team representing the country of my birth, England. This was the place where I had learned to fence and spent most of my fencing life. As a bonus, I could fence in both Foil and Sabre and would have a chance of qualifying for the team events based on my results in the individual events.

When I turned up in Melbourne, I was wholeheartedly accepted by both my new England team mates and the generally amused Australian fencing community. The spirit of camaraderie and sportsmanship among veteran fencers is excellent, and there were handshakes and back-slaps all round. My England team mates enjoyed having a “tame Aussie” on their side. I doubt that any of them had ever before been encouraged by one among them shouting the very Australian expression, “You bloody beauty!”, but nobody seemed to mind.

Fencing Sabre

I was very pleased with my results, coming 12th in the Veteran Men’s Sabre event, finishing above 8 Australian fencers. I was even happier with 9th in Veteran Men’s Foil, which placed me above not only 9 Aussies, but also above most of my England colleagues, thus qualifying for the Team Foil event. It was very exciting to fence on the Finals Piste with full ceremony in front of a vocal crowd. Unfortunately, England was beaten by Australia and New Zealand into the bronze medal spot, but at least I was a Commonwealth medalist!

Bronze Medal

It was a very emotional experience for me to receive my medal on the dias alongside my England colleagues, even if I had to remember not to sing along to Advance Australia Fair when the flags were raised.

On the dias

AutoCAD WS contest poll added

Thanks to all entrants in the AutoCAD WS contest. I have now closed the entries and added a poll (see right). Although I did state that there would be no prize for this contest, I have some exciting news! I am happy to announce that thanks to an exclusive* arrangement with Autodesk, the winner of this contest will receive a free** copy of AutoCAD!*** I will keep the poll open until I feel like closing it or the entry I like best is winning, whichever is the most convenient.

* Exclusive to people with Internet access.
** Excluding any Internet access expenses the winner may incur.
*** AutoCAD WS. If the winner is unable to use AutoCAD WS due to iThing insufficiency, browser-based access to Project Butterfly will be provided instead.

I got into a fight. Caught on video.

Last weekend, I competed for the first time in a national-level fencing competition, the “Be Active” Western Australian International Fencing Tournament (AFF#3). Most people compete in one or two events within a competition, but I thought I would challenge myself and had a go at all six of the individual events available to me. I set myself what I thought were realistic goals for each event. Here is how I did at chasing those goals:

Open Men’s Foil – goal: top 32 – result: 22nd – achieved.
Open Men’s Epee – goal: top 32 – result: 42nd – failed.
Open Men’s Sabre – goal: top 16 – result: 16th – achieved.
Veteran Men’s Foil – goal: top 8 – result: 3rd= – exceeded.
Veteran Men’s Epee – goal: top 8 – result: 6th – achieved.
Veteran Men’s Sabre – goal: top 4 – result: made the final – exceeded.

If you are interested, have 5 minutes to spare, and your access is not blocked at work, you can have a look at me competing in the final of the Veteran Men’s Sabre using this YouTube link. Hopefully, you should find it a pretty entertaining contest, even if you don’t entirely understand what’s going on. If I hit him you will see a red light, if he hits me it’s green, and if both lights go on that means we have both hit each other within 120 milliseconds and the referee decides the point based on right-of-way rules.

I have only been fencing sabre for about a year, so I was very happy to reach the final. That I did so is all down to my sabre coach at my club Excalibur, legendary Hungarian master Frank Kocsis. You can see him briefly on the video as he approaches me during the break to calm me down and get me to focus. I don’t think I’ve ever been that pumped!

Another language pack cleanup solution

My CADLock, Inc. colleague, Owen Wengerd has posted about a fix utility he has written to help clean up drawings infested with the language pack problem discussed here. I have not yet tested Owen’s utility*, but as this should run in any AutoCAD-based product from 2007 on, it could well be a better partial solution than Autodesk’s Civil 3D-only (so far) patches. Autodesk still needs to sort out its dodgy templates, of course, and should probably provide its own non-Civil 3D fixes, if only to maintain a little corporate self-respect.

As Owen has a long and distinguished history of being consistently and demonstrably better at AutoCAD programming than Autodesk’s own programmers, I’d be tempted to try this one first. However, Civil 3D users should probably apply the patches and updates anyway to help resolve other issues.

To find Owen’s utility, go to the ManuSoft ARX freebies page and look for CleanLanguage.zip. While you’re there, use the Software menu to check out some of the other stuff Owen has done.

* Edit: I have now tested it, and it works beautifully in both AutoCAD 2010 and Civil 3D 2011.

Partial fix for language pack problem

The Civil 3D group within Autodesk has moved impressively quickly in providing a partial solution to the language pack problem I described earlier. What has been provided so far is a set of patches for Civil 3D 2009, 2010 and 2011 that allow Civil 3D users to remove the spurious language pack flag by opening and re-saving the affected drawings. I have not yet tested this, but I am informed that it works.

What’s left to do? Obviously, not all recipients of these drawings are going to have Civil 3D. In fact, prior to isolating Civil 3D as one definite source of the problem, I had spent a lot of time helping out AutoCAD users clean up language-pack-infected drawings, using awkward and dangerous copy-and-paste methods. So Autodesk has AutoCAD and all its vertical variants to work through yet as far as a cleanup mechanism goes. Also, the problem needs resolving at the source end. All “infected” templates (in Civil 3D and any other verticals that may have the problem) need fixing and distributing to users as quickly and effectively as possible, in order to reduce the number of drawings being created with the problem. I know individual users can do this for themselves, but large numbers of users won’t do so if left to their own devices, causing problems for everyone else. As the originator of the problem, Autodesk has a duty to do its very best to resolve it.

Thanks, Autodesk, for quickly getting started on fixing the problem and providing a partial solution in a timely manner. I hope you can provide the rest of the solution equally efficiently.

Automated anti-telemarketer script – brilliant!

Annoyed by telemarketers? Too polite to abuse them or just hang up? Can’t be bothered wasting their time in person? Then you need AstyCrapper. If you’re using the open-source Asterisk PBX, it will crap on for ages on your behalf. It works by detecting responses from the telemarketer and silence gaps and responding with a series of recorded samples. It’s pretty convincing!

OK, maybe that doesn’t apply to you, but you can still have a good laugh at the example calls.

Autodesk shows Dassault how to treat customers

There are areas of Autodesk’s treatment of customers that leaves much to be desired, and I will most likely continue to be critical of that until a) I die; b) Autodesk dies; or c) the bad stuff stops happening. One thing for which Autodesk deserves praise is the distribution of bug fixes to its customers, without imposing the sort of conditions that SolidWorks customers have to put up with.

  • Do Autodesk customers need to be on Subscription to receive bug fixes? No, they do not.
  • Do Autodesk customers need to have purchased the software within the last 90 days to receive bug fixes? No, they do not.
  • Do Autodesk customers need to have reported certain specific bugs to receive bug fixes? No, they do not.
  • Do Autodesk customers even need to be running the current release to receive bug fixes? No, they do not.

AutoCAD 2010 Update 2 (that’s Service Pack 2 in the old language) has just been released for the users of last year’s software. This includes the Update 1 changes. The usual caveats apply, including reading the Readme first. As usual, Autodesk’s oddball numbering system means that after installation, Update 1 shows up as Version 2 and Update 2 shows up as Version 3 in the About screen.

This Update applies to straight AutoCAD (and LT), not the vertical variants. I have no news about non-English versions. Patrick Emin informs me these updates are language-independent.

Autodesk Knowledge Base – rapid response converts fail to win

Credit where credit is due. Following my rant about the uselessness of using a 16-minute YouTube video as the AutoCAD 2011 system requirements resource, the relevant people at Autodesk quickly fixed it and let me know.

Now we just need the other releases covered and we’ll be all set. Autodesk is still officially supporting AutoCAD releases back to 2008, and those people who parted with a big slab of cash a decade ago are Autodesk customers, too. I’m sure Autodesk would like potential new buyers of its current products to know that they will be at least minimally looked after in future.

I commend Autodesk’s Leo Casado for reacting politely and constructively to what was undoubtedly harsh feedback. Some Adeskers (by no means all) have been known to get extremely defensive when faced with criticism, insisting that all feedback should be expressed constructively. That’s nonsense, of course. Frank expressions of viewpoints are essential in order to resolve problems. Negative feedback, including harsh criticism, can be among the most useful forms of communication. Congratulations to Leo for showing how it can be handled positively, to the benefit of all.