cadalyst
AutoCAD

The Dim Side of Dimensions (Bug Watch AutoCAD Tutorial)

31 Jan, 2007 By: Steve Johnson

Find those bugs while they're young, and discover why editing objects can make your dimensions demented.


Bashing Bugs Before They Hatch
What's the best way to eradicate bugs? Squish 'em before they start running around and causing problems. For Autodesk products, the best way is to join the MyFeedback program, which gives you several ways to tell Autodesk about subjects you consider important. A particularly valuable way to become involved is the Beta Testing Program. If you join this program, you can try out the next release before it ships, and point out specific issues to Autodesk developers that are potentially going to cause you pain -- including bugs.

Here's an article by MyFeedback program manager Shaan Hurley that explains how you can sign up for AutoCAD Beta. There are beta programs for all Autodesk products, not just AutoCAD. Although I stick to plain AutoCAD in this column, many vertical variants of AutoCAD are in even more need of bug eradication. Don't be put off if you're a user of, say, Autodesk Civil 3D, because your help is very much needed.

The earlier in the software development cycle bugs are discovered, the cheaper they are to remove. This means you will have a much better chance of killing an AutoCAD bug by pointing it out in the Beta program than by any other method. Although the details must remain confidential, as a result of my involvement in the MyFeedback program there are specific things in AutoCAD that now work much better than they otherwise would. That's pretty rewarding.

The program also offers more tangible rewards. For example, Autodesk awards Autodesk University Scholarships to a few active MyFeedback participants every year. Last year, I was fortunate to be one of the scholarship winners. I spent a wonderful week in Las Vegas at Autodesk's expense and returned with a bulging bag of bling.

That doesn't mean Bug Watch is going to start going soft on Autodesk! Please keep sending me your bugs, because it's important that your fellow Cadalyst readers know about them, not just Autodesk.

Dimension Disorder (2002 to 2007 SP1)
Submitted by Ralph Grabowski
First, make sure you have object-associative dimensioning turned On. Set the DIMASSOC system variable to 2. Next, draw a rectangle and dimension all four sides. (Yes, I know it's bad practice, but that's not important right now.) You should see something like this:

figure
A simple dimensioned rectangle.

Now set a fillet radius and fillet the rectangle using the Polyline option. What would you expect to see? Something like this, perhaps?

figure
Expected result after Fillet command.

Instead, AutoCAD gives you something like this.

figure
The actual result after the Fillet command.

You don't have to use the Fillet command's Polyline option for this to happen. The same sort of thing occurs when filleting the corners one at a time. The Chamfer command has similar issues.

What's going on here? It appears that the dimensions are associated with specific polyline vertices. The Fillet and Chamfer commands insert new vertices, and in turn push the existing vertices around. The Fillet and Chamfer commands simply aren't smart enough to handle a situation when there are dimensions associated with the polyline.

There are other commands that are similarly unintelligent. Use the Break command on that rectangle and you may see something like this.

figure
Result after Break command.

That result is actually pretty good, compared with other cases you might come across. Put a break in the first segment of this polyline and see what happens.

figure
Before Break command.

You might expect to see this.

figure
Expected result after Break command.

Instead, you'll see this.

figure
Actual result after Break command.

The Break command results in two polylines and the dimensions are all shifted onto the first polyline, creating an unholy mess.

Why is this a bug and not just a wishlist item? Because it doesn't have to be like this. Some AutoCAD commands are smart enough to deal with situations like this, others are not. If you have some convenient cutting edges, you can use the Trim command to punch exactly the same hole in the above polyline, with the result shown below.

figure
Result after Trim command.

Similarly, the Pedit command interacts with the dimension objects intelligently enough to provide reasonable results if you use the Insert, Straighten or Break sub-options of the Edit vertex option.

Workaround. I'm not going to suggest you explode your dimensions, because I don't want Dialog Box filled with irate correspondence pointing out how irresponsible I am! I even feel nervous suggesting that depending on your circumstances, you may find it is preferable to use point-associative (DIMASSOC=1) dimensions instead of object-associative ones (DIMASSOC=2). I will just suggest that if your dimensions suffer a prolapse when you edit something, try alternative editing methods such as the Trim example above.


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!