I had a nice surprise this weekend. Jorge Lopez, an old friend and colleague, had been reading this blog entry and decided to create a Visual Studio AddIn that allows you to see resbufs content expanding automatically while debugging.
Jorge and I go back a long way - he used to work in DevTech (before it was called that) in our Americas team, back when I was based in Europe the first time. He later went on to join AutoCAD Engineering, and was one of the key contributors to AutoCAD's COM Automation API (although back then it was called either OLE Automation or ActiveX Automation - I can't remember exactly the nomenclature at the time).
[ A side note: This isn't an isolated phenomenon: a number of DevTech Engineers have moved into different teams and functions inside Autodesk over the years. Working in DevTech, providing technical services to ADN members, you learn a lot about our products and about developing software with Autodesk technology. Ex-DevTechers have moved into Product Management, Technical Publications, QA, Consulting and - most commonly - Software Development. Many do stay in the team, especially those that have already worked in Software Development and like the variety and relative freedom of DevTech.
Anyway - this has turned into a bit of a sales pitch, so before I get back on topic, here are our two open positions, one in Prague and the other in Beijing. :-) ]
I'm very pleased to say Jorge is back with Autodesk after several years away, once again developing software for our Platform Technologies division.
So here's the project and additional information that Jorge sent through...
Download arxdbgaddinSource.zip
If you build the Win32 projects, it will copy to the appropriate folder where Visual Studio can find it. Otherwise, just copy the included DLL in the Release folder of the zip to an appropriate location.
Add the following to [AutoExpand] section of autoexp.dat.
; ObjectARX resbuf
resbuf=$ADDIN(arxdbgaddin.dll,AddIn_Resbuf)
I used the BlockView sample on the ObjectARX 2007 SDK (under samples/graphics) to test this out in Visual Studio 2005, as this sample happens to use resbufs for two different purposes: it uses acedGetFileNavDialog() to select files, which returns the filename in a resbuf, and it uses acedGetVar() to get the value of the VIEWCTR system variable, a 3D point also returned in a resbuf.
Here's what you see in the debugger for resbufs containing strings and 3D points without the AddIn loaded:
And here's what you see with the AddIn loaded:
As mentioned earlier, this was coded for and tested with Visual Studio 2005 (VC8.0) - I have no idea whether it will work with previous versions or different flavours of Visual Studio.