Outside The Box

Random thoughts about AutoCAD, ObjectARX, and the meaning of life.
All Original Content Copyright 2006 - 2008 Owen Wengerd, All Rights Reserved

'Twas the week before Christmas, and all through the city
Highways congested, tempers were tested; the sight wasn't pretty

The stores opened early, and stayed open late
Registers rang, loudspeakers sang; as I tempted fate

I proceeded with caution, threading the aisles
Squeaking wheels, dubious deals; all the new styles

I grabbed toys for the boys, and a gift for my niece
Loaded my cart, doing my part; to help the Chinese

I rushed to the checkout, avoiding a wreck
Teeming masses, slow as molasses; all writing a check

After walking a mile, got it all in my car
Loaded for bear, gasping for air; I didn't get far

After dodging and weaving, with skill and deft
Almost out, stuck en route; they're all turning left!

Happy Holidays Everyone!
I've installed Visual Studio 2005 SP1 and have been busy testing all my projects to make sure they didn't break. Microsoft did fix at least one of the bugs I reported (the resource editor choked on resource strings that contained an embedded NULL character), but the IDE still crashes fairly consistently if I initiate a large solution build while the Intellisense database is being rebuilt. SP1 also managed to break my VCBuildHook utility, so I've uploaded an updated version (2.0.3.0) for use with SP1.

Labels: , , ,

Finally, the long awaited service pack 1 for Visual Studio 2005 is released! The service pack has been in the pipeline since soon after Visual Studio 2005 shipped last November, with release dates slipping month after month. The latest official release date was announced as "early 2007". Perhaps this was an intentional attempt to alleviate some of the waiting pains with a suprise release (or maybe just the Microsoft rumor mill on autopilot).

Be prepared for a long install. The download page warns that it could take an hour or more to verify digital signatures before the service pack installation even begins.

Labels: , , ,

2006-12-12
The recently filed lawsuit has been a hot topic lately, and I've been following it along with everyone else. As a little side project, I decided to create a parallel blog dedicated to the ongoing battle between Autodesk and ODA. The new blog is at http://www.ADSKvODA.com.

The site is still a work in progress, but I hope you'll check it out, and offer suggestions for improvements. Click on the Lawsuit Tracker link to view all the court documents in the case, and subscribe to the site's feed to stay informed of new developments.

Labels: , ,

No matter the communication protocol used to transmit it, most information gets packaged into a file format for consumption. File formats are like virtual checkpoints along the information superhighway, and we would do well to pay attention to who is manning the gates.

We've heard a lot of noise lately about the need for "open" file formats, but documenting a file format is not the same thing as relinquishing control of the format. The key consideration is who decides when and how the file format changes. This is a dirty little secret about file formats that you are not supposed to know. By controlling when and how a file format changes, an organization can maintain a mindshare monopoly over consumers of its file format -- even when the format is "open".

It may be that the relative anarchy of the internet has given us a false sense of security. We happily use "open" formats like PDF, DWF, DXF, HTM, and others with relatively little concern about who controls them, but all of those formats (HTM perhaps to a lesser degree) are controlled by corporations whose allegiance is first and foremost to their shareholders. For example, PDF is "open", but did you know that third party developers need a digital ID signed by Adobe in order to create forms-enabled PDF files that can be opened in the free Acrobat Reader?

In April of 2006, Autodesk filed a trademark application for the word "DWG" when used to refer to DWG files. This may seem benign on the surface, but if successful it will give Autodesk more legal leverage in "defending" the file format. A few weeks ago, Autodesk filed a trademark infringement lawsuit against the Open Design Alliance claiming that the ODA infringed their "AUTODESK" trademark by embedding the mark inside DWG files created with its DWGdirect libraries.

Much has been written by the pundits about the pros and cons of the ODA lawsuit, and the Electronic Frontier Foundation predictably suggests that Autodesk is using trademark claims to stymie interoperability, but the bottom line is that the contention centers around a file format -- a file format that Autodesk considers valuable enough to wage war over.

Labels: , , , ,

If you've been programming with ObjectARX for a while, you already know that each version of the ObjectARX SDK only works with a specific version of Visual Studio. Mazhar Basa touches on the subject in his article Components of ObjectARX Applications. My VCBuildHook utility makes it possible to build for multiple target AutoCAD versions from a single Visual Studio 2005 solution, but this utility still needs the older versions of Visual Studio to be installed on the same system in order to perform its magic.

The problem is, legitimate licenses of older versions of Visual Studio are hard to come by. Back in the Visual Studio .NET 2003 days, you could purchase a new license of VS 2003, then get a free license downgrade from Microsoft that allowed you to install Visual Studio 2002 side by side on the same system. That combination allowed you to target AutoCAD versions as far back as AutoCAD 2004. Unfortunately, Microsoft stopped offering the VS 2002 downgrade license when Visual Studio 2005 began shipping in November of 2006.

The end result is that new ObjectARX programmers are faced with a dilemma if they need to target anything older than AutoCAD 2007. One of the attendees at my "High-Octane ObjectARX" class at AU 2006 reminded me that MSDN (Microsoft Developer Network) members can download older versions of Visual Studio from the MSDN subscriber download center.

I have verified that Visual Studio .NET 2002 (VS 2002) is available for download to MSDN Professional subscribers, but I could not find Visual Studio 6.0, which is required to target AutoCAD 2000 - 2002. Visual Studio 4.2 (required for AutoCAD R14) is available though, so maybe I'm just not looking in the right place.

If you are a professional software developer, whether commercial or in-house, you should consider subscribing to MSDN for various reasons. If you're an ObjectARX programmer and need to target older versions of AutoCAD, MSDN may be the only way to obtain the older Visual Studio build tools and libraries that you'll need.

Labels: , ,

Not according to the press release. Vista (and .NET 3.0) includes a built-in XPS Viewer (also available for Windows XP SP2 and Windows Server 2003), which will view any XPS format file. Apparently Autodesk plans to add support for output to XPS format in the future, and this output will be called DWFx -- a new file format. It's not clear what the difference will be between DWFx and the output produced using the Microsoft XPS Document Writer that is already available.

I installed the Microsoft XPS Document Writer and XPS Viewer on my Windows XP SP2 machine. Next, I started AutoCAD 2007 and opened "3D House.dwg" from the Sample folder. I then plotted this file to DWF, PDF, and XPS, with the following results:


PlotterPlot TimeFile Size
DWF6 ePlot.pc37 seconds139 kb
DWG To PDF.pc35 seconds165 kb
Microsoft XPS Document Writer34 seconds829 kb

I'm not suggesting that these files all contain the same content, I'm merely suggesting that DWFx/XPS may have some undesirable tradeoffs in practice.

This whole issue about "native Vista support for DWF" may be nothing but smoke and mirrors. There is no guarantee that publishing CAD data in the XPS format will be efficient. So what will happen if users can choose between a compact DWF, a slightly less compact but ubiquitous PDF, or a very space-hungry DWFx? Time will tell, but I think this issue of DWF in Vista is getting way to much spin and not enough critical analysis.

Labels: , , , ,

Some years ago I wrote a small ObjectARX module named VLXLoad that loads a .vlx file of the same name and in the same directory as the .arx module. I never claimed credit for the utility, but now that I've released the source code, I guess I'll have to own up to it.

If you're interested in seeing an example of "dynamically" defining an ADS (lisp callable) function when an ObjectARX module loads, take a look at the VLXLoad source code. The code also demonstrates how to call the GetModuleFileName() WinAPI function to get the path of the executing module, and how to declare and use the undocumented ads_queueexpr() function.

There is no documentation (and probably no comments), so be warned. The download contains ready to build projects for Visual Studio 2002 (targeting AutoCAD 2004-2006) and Visual Studio 2005 (targeting AutoCAD 2007). These projects were both created with the corresponding ObjectARX wizard, and are included in the course materials for my "High-Octane ObjectARX" class at AU 2006 as an example of a simple (yet very useful) ObjectARX application.

If you just want to use VLXLoad, I've also made the original pre-built binaries available on my Freebies page. The idea is to rename the correct .arx file so it matches the name of your .vlx, then set up registry demand loading so that the .arx loads when AutoCAD starts. The .arx then loads the associated .vlx file, and voila, demand loading for .vlx files. Instructions for setting up demand loading have been posted on the 'net in the past (and it is well documented in the ObjectARX SDK), so I won't describe that here.

Labels: ,

It may seem strange to some of you, but I consider myself an artist. Visual Studio is my canvas, and the keyboard is my paintbrush. This is why I wouldn't survive in a stuffy corporate environment with committees, red tape, and politics. I'm a visionary, not a software engineer. I don't like to plan every little detail; I'd rather start with a grand vision and just let the code go wherever my vision leads it.

I confess this can be both a strength and a weakness. For example, I'll spend two weeks refactoring perfectly working code because I don't think it's elegant enough. On the other hand, aesthetic beauty of structure and architecture is every bit as important in software as it is in other fields. It's just that the benefits are intangible and more difficult to quantify.

Perfectly working code, you say? I admit, that's a bit of a rarity these days. It's a rarity precisely because not many programmers consider programming as an art form. Real artists are never satisfied with their work; they never stop working toward absolute perfection of both form and function.

This leads me to my real point. I have a favorite saying, "Have you made your mistake today?" Ironically, perfection can only be achieved by making mistakes. If you're not making mistakes, you're not learning. If you're not learning, you're not taking any risks. If you're not taking any risks, you're achieving mediocrity at best. Learn to make mistakes gracefully. Enjoy your capacity to learn and evolve toward perfection, no matter what kind of art you create.

Labels: ,

This year I taught an ObjectARX class at AU. As usual, there wasn't nearly enough time to cover all the things I wanted to cover. I'm still contemplating what I want to do differently next year in order to be able to spend more time on the subject without boring everybody to death.

By the way, fellow programmers, do you agree that we need a Programming campus at AU 2007? I hate being lumped into a generic category like General Design. I suggest a new campus just for programmers, with our own industry reception (I'm thinking pizza, beer, and a Pink Floyd tribute band -- and Lynn Allen of course).

If any of you went to the Programming Gurus Go Head To Head panel discussion on Thursday afternoon and were wondering why I wasn't present... well, er, next time, could you please call me on my mobile phone a few minutes before the class to jog my aging memory? Sheesh. I always enjoy the quasi-chaotic gurus panel, and I can't believe it completely slipped my mind.

Speaking of chaos, I like chaos -- but more on that subject later. I like unscripted discussions where the topics are limited only by the imaginations of the participants. I usually sit in on a few classes at AU, but with a few rare exceptions, the only time I learn something new at AU is outside the structured classrooms.

This year I did learn something new in a class, though. I sat in on Josh Johnson's Demystifying Installers class, and I learned how to create a new registry key that AutoCAD's secondary install uses to trigger a third party secondary installer (this would occur when a new user logs in for the first time). Thanks, Josh! I did not know that! [An interesting sidenote: Josh taught the class with his father in the audience. How cool is that? Er, not cool at all, especially in Vegas! Seriously, I thought it was cool, and it was a pleasure to meet both of the Johnsons. Good thing I brought... never mind.]

Labels: , ,

If you were at AU this year, you may have seen some of my take5 and AUGI friends wearing blue T-shirts with this tag line on the back. This year my CADLock compatriots (Dietmar Rudolph of Germany and Steve Johnson of Australia) were both at AU, so we decided to have a little fun with this protection theme. We brought some "protection" to go along with the shirts (no, those little matchbooks did not contain matches).

Now that you're back home, I hope you'll take a few minutes to learn how to protect your AutoCAD drawings. You can download CADVault for AutoCAD from the CADLock web site and run it in fully functional evaluation mode to see for yourself how CADVault can securely lock your AutoCAD drawing content.

Help fight IP theft: practice safe CAD!

Labels: ,

The French expression tuit de suite pretty much sums up how I feel after every Autodesk University, and this year is no exception. So much gets crammed into one week, with barely any time to decompress or collect my thoughts, let alone catch up with all the latest gossip or relax with old friends.

I had a tradition back in the early days to describe the people I met at AU. That tradition fell by the wayside as the heady days of youthful exuberance gave way to the practical realities of putting food on the table and making sure the bills got paid. Nowadays, the list would be far too large anyway.

Just like the old days, however, I come back from AU energized and replenished, not with more knowledge per se, but with information, ideas, and revitalized motivation. This year I've resolved to jump on the blogger bandwagon and share some of my thoughts for posterity.

Welcome aboard. I hope you enjoy the ride!

Labels: