Visual Studio 2010 Native Multi-Targeting

I was hoping that Microsoft would address the need to target earlier versions of Visual Studio within the Visual Studio 2010 IDE, but since they decided to punt, I tackled the problem myself. I’ve released my solution as an open source project named Daffodil for Visual Studio.

With Daffodil installed on your system along with earlier versions of Visual Studio, you can use the new native multi-targeting feature in Visual Studio 2010 to target those earlier versions. This makes it possible to use Visual Studio 2010 for building ObjectARX projects, for example. Daffodil performs essentially the same function that my VC Build Hook utility did in Visual Studio 2008 and 2005.

Missing Language Pack DWG File Repair

I wrote before about corrupt text causing bogus “Missing Language Pack” warnings in AutoCAD. That case prompted me to write a file repair utility. However, since the case appeared to be isolated, I never released the utility to the public.

The problem has been rearing its ugly head again, so I decided to dust off the original code and release it. The repair utility is now available on the freebies page (look for CleanLanguage.zip) for AutoCAD 2007 and later versions of AutoCAD. I have not tested any recent cases, so I can’t be sure it is the same problem. If you try the utility, please report your results by leaving a comment here.

Using VC 7 build tools in Visual Studio 2010

[Update: See Visual Studio 2010 Native Multi-Targeting]

Developers, if you use VC Build Hook and/or need the same capability in Visual Studio 2010, please let Microsoft know by voting for a fix. I’ve written before (and here) about the problem. I think it is possible to hack a third party solution, but by far the best solution is for Microsoft to add back the ability to produce ANSI response files in service pack 1.

GlowCode Success Story

I use GlowCode for profiling ObjectARX applications. As far as I know, this is the only profiler that works with AutoCAD. What makes GlowCode special is that it can instrument code on the fly, including a monster like AutoCAD. It has a clunky interface that takes some patience to figure out, but it’s a lifesaver when you need it.

Recently a CADLock customer sent us a drawing file that was apparently not very complicated, yet it took over 20 minutes to create a deep vault. To determine the cause, I used GlowCode to profile the vault creation process. I could see almost immediately that most of the time was being spent in AcDbObjectId::operator ==, which was being called from AcDbObjectIdArray::find.

This turned out to be a classic case of using the wrong type of container. Searching an AcDbObjectIdArray isn’t bad when the array is small, but this drawing contained a special case where the array was very large, and this special case exposed the flaw. I changed the array to a std::set and tested again. The new time was 30 seconds to create the vault — a slight reduction of approximately 95%.

[Full Disclosure: Electric Software has for many years provided me with a complimentary license of GlowCode in exchange for my testing and feedback.]

Bricsys 2010 Developer Conference Post Mortem

I am back home after a whirlwind trip to the Bricsys 2010 Conference. I’m very happy to be back to Ohio food and my own bed. It was a great experience and well worth the trouble.

I’ve written before (and here) about the problem with food at conferences, and this one was no different. Unfortunately, there are no Burger Kings in Belgium, so the problem was compounded. I was excited when I saw a restaurant touting “American Food”, unfortunately it was “American Food as Europeans Imagine It”, which is not American food at all.

The hotel was, well, let’s just say you got that genuine experience of living in the past. Not quite the stone age past, but clearly before the age of modern locks and clocks — and well before air conditioning was invented. To make matters worse, housekeeping did not replace the provided shampoo and soap, so I had to make do with no soap on day 2 of the conference. The concert hall where the conference was held was also not air conditioned, which just compounded the problem — and certainly contributed to the dispersement of attendees from initially a small intimate group on day 1 to most of us sitting in the galleries by ourselves by the end of day 2.

The good news is that all the suffering was worthwhile. Bricsys was very accomodating, and it was a pleasure to meet modern day Robin Hood and Bricsys CEO Erik de Keyser and his merry band of men. Deelip Menezes’ keynote address about the future (cloud) of CAD (cloud) was (cloud) excellent, and the discussion that followed turned into a 12 round bout that Deelip played to a draw. Well done, Deelip, well done. I’m sure the fight will continue virtually, so take heed, and stay out of the line of fire.

I learned that Bricsys has made an impressive investment of time and resources into a foundation upon which to build a “DWG CAD” business. This is no longer about who can take on Autodesk. Autodesk conceded the AutoCAD (or “DWG”) market with their push toward subscription (aka “maintenance”), annual release cycles, and artificially high pricing on their platform technologies. There are literally dozens of companies trying to capture that market: products like ZWCAD and GstarCAD from China are hot on the heels of Bricscad. This is about who will emerge to control the market that Autodesk abandoned, and to some extent about how Autodesk will respond.

Bricscad is currently the clear leader among DWG CAD companies in terms of technical capabilities, but at least to date, it’s mostly AutoCAD application developers that recognize this (because of Bricsys’ very successful effort to make their BRX API source code compatible with ObjectARX). The question is whether they can convince consumers that Bricscad is the best choice. I think we will be a long way toward answering that question by this time next year, and of course the answer will be critically important to the DWG CAD market. I think it was shrewd of Bricsys to invite thought leaders like Deelip to this conference, but that is only a first step. Still, the very fact that I am writing and Deelip is blogging and tweeting about Bricscad is an important milestone on the road to respect.

[Full Disclosure: Bricsys paid for all my travel and conference expenses.]