Bug Watch: April 20031 Apr, 2003 By: Steve Johnson
Spitting at Image (14 to 2002 SP1)
Use the Image command to attach an image to a new drawing, and draw a few lines on and around the image. Save the drawing as CHILD. Start a new drawing and attach CHILD.DWG as an xref. Now use the Xclip command to create a nonrectangular polygon clipping boundary around the xref. The lines in the xref clip correctly, but the image does not. Instead of clipping the image part of the xref to the polygonal boundary, AutoCAD clips to the smallest rectangle that can fully enclose the polygon. This leaves areas of image showing that should not be there. This is not just a display glitch. If you create a plot, the unwanted image portions appear there, too.
Workaround: If you open CHILD.DWG and perform an Imageclip to the same shape of polygonal boundary that you used in the parent drawing, that clip is respected and the parent drawing displays the expected contents. This is undesirable because you'll need to ensure that any changes to the boundary are synchonized in the child and parent drawings. Also, you can use this workaround only if you always want CHILD.DWG to appear clipped in this way. If you want to use CHILD.DWG unclipped as a drawing in its own right or as an xref to another parent drawing, this workaround is no good to you.
You may be able to achieve the same results by using a nonrectangular paper space viewport in the parent drawing, although this may require a fair bit of work in a drawing that is currently all in model space. Alternatively, if you have Express Tools, you can use the Wipeout command to cover over the unwanted image portions. Failing that, you can to resort to clunky old clipping kludges such as covering the unwanted areas with 3D faces and plotting with hidden-line removal turned on. But beware of side effects such as solid-filled objects (dimension arrowheads, for example) that appear hollow in the plot.
Flipping thing (2002 SP1)
When you use the -Dimstyle command (note the leading hyphen), AutoCAD rather pointlessly and annoyingly flips to the text screen.
No known workaround.
Childish leaders don't want to change (2002 SP1)
In a new drawing, draw some linear and radius dimensions and some leaders using the default dimension style called Standard. Next, start the Dimstyle command (nee Ddim) and use the New button to create a new child dimension style. Make sure you start with Standard. In the Use For popup list, select Linear Dimensions and pick Continue. Change something obvious like the extension line color and click OK. Repeat this process to create child dimension styles for radius dimensions and leaders, then pick Close. The linear and radius dimensions you drew earlier automatically update to use the child dimension styles you created, but the leaders do not. If you draw some new leaders now, they use the appropriate child dimension style, but this means that you have two different kinds of Standard leaders in your drawing. As someone once said, the great thing about standards is that there are so many to choose from.
Don't throw this drawing away. We're going to use it to demonstrate the next bug.
Workaround: Use -Dimstyle Apply (if you can tolerate the flipping thing) on the leaders. It updates them to use the leader child dimension style.
$7 won't buy you a leader (2000 to 2002 SP1)
Here's one for the AutoLISPers out there. In the drawing left over from the previous bug, list one of each of the different leaders. Note that the original one has the style name Standard, and the newly drawn one has the style name Standard$7. This is how AutoCAD designates the use of a child dimension style. Standard$0 indicates a linear dimension child style, Standard$4 is a radius style, and so on. In AutoLISP, you can use the (ssget) function to select dimensions based on these styles. For example, this code snippet selects all Standard dimensions that use a linear child style:
(ssget "X" '((0 . "DIMENSION") (3 . "Standard$0")))
Likewise, the following selects all Standard dimensions that don't use a child style:
(ssget "X" '((0 . "DIMENSION") (3 . "Standard")))
It follows that this should select all Standard leaders that use a child style:
(ssget "X" '((0 . "LEADER") (3 . "Standard$7")))
But it doesn't select anything, and that's a bug. Likewise, this should select all Standard leaders that don't use a child style:
(ssget "X" '((0 . "LEADER") (3 . "Standard")))
Instead, it selects all Standard leaders, regardless of whether they use a child style. These bugs can cause problems with innocent menu macros and AutoLISP routines.
Workaround: You could rewrite your AutoLISP programs to use Visual LISP functions. However, it's probably easier just to leave off the $7 and walk through the selection set, inspecting the 3 code of each entity and ignoring the irrelevant ones.<
About the Author: Steve Johnson
Autodesk Technical Evangelist Lynn Allen guides you through a different AutoCAD feature in every edition of her popular "Circles and Lines" tutorial series. For even more AutoCAD how-to, check out Lynn's quick tips in the Cadalyst Video Gallery. Subscribe to Cadalyst's free Tips & Tools Weekly e-newsletter and we'll notify you every time a new video tip is published. All exclusively from Cadalyst!