LspLoad Updated for AutoCAD 2014 and Bricscad 13 64-bit

The automatic lisp loader modules (LspLoad.zip on my freebies page) have been updated to add support for AutoCAD 2014 and Bricscad 13 64-bit. The modules are now digitally signed so that AutoCAD 2014 loads them quietly. Share ThisTweetFacebookLinkedInTumblrStumbleDiggDelicious

Using /delayload to specify dependent DLL path

Let’s say you have an ObjectARX module with an implicit dependency on another DLL. Your installer puts both your ARX module and the dependent DLL into a private application folder. Windows must be able to resolve the implicit DLL dependency at load time, otherwise it will fail to load your ARX module. Alas, Windows will …

Continue reading ‘Using /delayload to specify dependent DLL path’ »

QuirkyPolyline: exposing foolish programmers

In AutoCAD, the AcDbCurve class defines a general parametrized curve. On a parametrized curve, points in space are mapped to real numbers (parameters) by an arbitrary function F(p) for values of p from the curve start parameter to the curve end parameter. Defining a curve this way simplifies working with complex 3D curves because one …

Continue reading ‘QuirkyPolyline: exposing foolish programmers’ »

Polymorphic bit flags in C++

I often encounter cases in ObjectARX programming where numerous boolean flags need to be persisted as part of an AutoCAD database object. For filing and for passing around to other functions, it’s most efficient to package those bit flags into a single unsigned integer. Below is an example that demonstrates how to use a union …

Continue reading ‘Polymorphic bit flags in C++’ »

Checking function return values

A lot of you are guilty of not checking return values from API function calls. I’ll bet you have a good excuse, like “it’s a lot of extra typing for no reason”, or “that function should never return an error code”. I check return values religiously, use asserts liberally, and never assume that the implementation …

Continue reading ‘Checking function return values’ »