Careful with those Dimensions! (Bug Watch AutoCAD Tutorial)

31 Jul, 2007 By: Steve Johnson

Two different ways to kill AutoCAD 2008 with dimensions -- and a fix for one of them.

Jogging Can be Bad for You (2008)
Do you need to use object snap on hatch objects? Some people do, but AutoCAD 2008 defaults to ignoring hatches. That isn't a bug -- it's a feature! You can change AutoCAD's behavior by using the Options command. Turn off the Ignore Hatch Objects toggle in the Drafting tab, under Object Snap Options. This change affects the OSOPTIONS system variable, setting it to either 0 or 2.

Happy now? You will be, but only until you attempt to create a jogged linear dimension. Draw a linear dimension and make sure you have running object snaps turned on. Next, invoke the Dimjogline command (Dimension, Jogged linear) and pick your dimension. Boom! AutoCAD will crash with the message INTERNAL ERROR: !scandr.cpp@815: eWasOpenForWrite. At least it's a relatively well-behaved crash. AutoCAD should allow you to save your work and generate a Customer Error Report informing Autodesk of the problem.

Workaround: Before using the Dimjogline command, you can either turn off your running object snaps or temporarily tell AutoCAD to ignore hatches. As this can be a bit tedious, I've written a simple LISP routine to do it for you. Download the DIMJOGLINEFIX.LSP file from Cadalyst's Get the Code! page. The file defines a Dimjoglinefix command and a DJ short-form version of the same thing. Upload this file using the usual methods (for example, add it to the Appload command's Startup Suite), and you can use my safer version of the command instead of Dimjogline.

That's What I Call Breaking Things (2008)
The new Dimbreak command allows you to place gaps in dimension extension lines, a command that many people have been requesting for years. It allows dimensions to be differentiated more clearly from other drawn objects, although it is frowned upon by some drafting standards. I don't want to get drawn into that debate; I'll just demonstrate a dastardly Dimbreak danger.

It's quite common for new commands and features to fail to cooperate with other commands and features, because it's difficult for Autodesk and its beta testers to try every possible combination of command, object, and feature. This bug is different in that the new feature fails to cooperate with itself. If you accidentally break a dimension using itself, which can be done quite easily using the Dimbreak command's Multiple option, you have created a deadly dimension object. If you use that object subsequently to break another dimension, you will kill AutoCAD. This crash is not well-behaved. It provides no error messages; AutoCAD just vanishes without a trace, along with any unsaved work.

No known workaround.

Oh, Snap! (2008)
Have you noticed that AutoCAD 2008's object snap doesn't always work on blocks? You may find that it works on some blocks but not others. That's because the bug appears only when there is a combination of blocks containing one or more attributes together with old-fashioned heavy polylines (including 3D polylines) within those blocks.

As an example, download the 2008BUGOSNAPBLOCKATTRIB.DWG file from Cadalyst's Get the Code! page. The drawing contains two blocks. Start the Line command with a running endpoint osnap on and hover over a few objects. The left block has no attribute, and osnap works correctly on all objects within it. The right block is identical, except for the addition of an attribute, and osnap fails for the heavy polylines objects.

Workaround: You may be able to explode or redefine the blocks to use lightweight polylines, but that option is rarely practical.

More News and Resources from Cadalyst Partners

For Mold Designers! Cadalyst has an area of our site focused on technologies and resources specific to the mold design professional. Sponsored by Siemens NX.  Visit the Equipped Mold Designer here!

For Architects! Cadalyst has an area of our site focused on technologies and resources specific to the building design professional. Sponsored by HP.  Visit the Equipped Architect here!