AutoLISP programmers may remember a product named ObjectDCL, by 3rd Day Software. ObjectDCL was released as open source in the summer of 2006 by developer Chad Wanless due to his inability to continue supporting the software because of “health reasons”. At the time, many users of ObjectDCL hoped that someone would update the code to work in AutoCAD 2007. Programmer David Robison did some work to get AutoCAD 2007 supported, but the project has been languishing, almost to the point of extinction.
After being asked by several ObjectDCL users whether I could help, I decided a few weeks ago to contribute to the community by getting the original C++ code updated to support AutoCAD 2007. As I am wont to do, I’ve ended up re-architecting much of the code in the process.
The results of my work are available now at the new OpenDCL project on SourceForge. The new 4.0 release is still in the alpha testing phase. If you program in AutoLISP and want to create rich user interfaces for your applications, check it out!
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.