Thursday, July 29, 2010
Home   |   Search   |   About AUGI   |   My AUGI   |   Join Now
<< < > >>

TIPniques: How Things Stack Up, Part 3 - January 2006

(Discuss this Article! in AUGI's Discussion Forums.)

Happy New Year! It’s stacking up to be a great year. Sorry, couldn’t resist!

AutoCAD’s Draw order features allow you to control how objects are “stacked” on top of, or underneath, each other. I recently did some technical illustrations using AutoCAD and draw order played a significant role in controlling solid fills, raster images, and linework. Fortunately, the draw order option is much easier to control since AutoCAD 2005. By default, an object’s draw order is determined by the order in which they are drawn. In the spirit of the upcoming Winter Olympics, here’s an example based on the Olympic rings. The rings were drawn from right (red) to left (blue) and you can see how they stack up.

The DRAWORDER command is pretty basic, and fairly intuitive. It is readily available on the shortcut (right-click) menu, as well as from the Tools menu, or by typing the DRAWORDER command itself. There are four options. Both the default option, “Back”, and its converse, “Front”, are straightforward; selected objects are either sent behind, or brought on top of, all other objects in the current space. Below, the yellow and green rings were sent to the back.

The other two options, “Bring above objects”, and “Send behind objects”, provide you with a greater degree of control. With these options, you control the order of the first selected objects and their relation to next selected objects. All four of these options support the noun-verb feature. In our example, the rings can be restored to the original order by selecting the yellow ring and “sending it behind” the blue ring, then selecting the green ring and “bringing it above” the red ring.

The TEXTTOFRONT command is a unique way to control draw order. It brings only the text and dimensions to the forefront of all other objects. While there are no other such commands for controlling the draw order on a “per object” basis, don’t forget about using “Quick Select” from the Properties Palette or the QSELECT command. This will allow you to create a selection set based on object types or object properties, then use DRAWORDER command to reposition the selected objects.

AutoCAD 2005 introduced a new draw order concept called “inheritance”. This concept applies to new objects that are created from existing objects. In the example below, the yellow ring is OFFSET and you can see that the new ring “inherited” the draw order properties of the original ring. The gray solid hatch also inherited the draw order of the red ring.

Speaking of hatching, 2005 handles the draw order of hatching very nicely. Notice that the gray hatch is “under” the red ring (its boundary). In the Hatch dialog box, you can specify the placement of the hatch in relation to other objects, not just the boundary. The “Send to back” option, for example will send the hatch behind all other objects, including the object(s) selected as the boundary.

These options can also be controlled by the HPDRAWORDER system variable. Per AutoCAD’s online help (with comments added), the settings are: 0 – None. The hatch or fill is not assigned a draw order (i.e. it will be placed on top of everything else) 1 – Send to back. The hatch or fill is sent to the back of all other objects. 2 – Bring to front. The hatch or fill is brought to the front of all other objects. 3 – Send behind boundary. The hatch or fill is sent behind the object that is selected for the boundary. 4 – Bring in front of boundary. The hatch or fill is brought in front of the object that is selected for the boundary.

AutoCAD has definitely made its draw order features more intelligent. There is a drawback, though. When you explode a block, AutoCAD will retain the draw order of the objects within the block. If it is a complex block, this can slow down the process significantly, even to the point that it appears that AutoCAD has locked up. Given enough time, it will finish the process. In AutoCAD’s help, it states “With full draw order functionality, some editing operations may take slightly longer.” I’ll say! Fortunately, you can turn off the full draw order functionality by setting the DRAWORDERCTL system variable to 0 (the default is 3). There are 4 settings for this variable, 0-3. Honestly, the only ones that I found useful were 0 and 3. And the 0 is important (IMO) primarily when exploding complex blocks.

One last comment on draw order. Don’t forget about “object cycling”. Holding the control-key down when selecting objects will make it easier to select objects that are “behind” another.

That’s it for this month. Hope your new year has started off well and continues throughout.

(Discuss this Article! in AUGI's Discussion Forums.)

Submitted by Chris Lindner, an AutoCAD user/consultant/trainer/developer for over 19 years. Chris is a former Top DAUG winner and currently a member of the AUGI Board of Directors for 2005-06. He serves as Director of CAD Technology for WD Partners. He can be reached at Chris.Lindner@augi.com.


<< < > >>