Delmar Cengage Learning   Your Learning Solutions Partner

Home   |    Press Room   |    About Us   |    Contact Us   |    Site Map

New Commands in AutoCAD 2005: Part 4

Improvements to Display Order
by Ralph Grabowski

Introduction
This month, we look at new commands and system variables that improve AutoCAD's ability to control the display order of overlapping objects: TextToFront, HpDrawOrder, and DrawOrderCtrl.

What is display order? It is the order in which overlapping objects are displayed. When you draw in AutoCAD, the subsequent objects are drawn overtop previously-drawn objects. Most times, this isn't a problem; sometimes, it is.

When you want to change the display order of objects, use the DrawOrder command -- introduced way back with AutoCAD Release 14. Select one or more objects, and then specify whether you want them display in front of, or behind, other objects. This command affects both display and plotting.

Display order (a.k.a. draw order) didn't always work correctly, often forgetting its settings. Autodesk says it's fixed in AutoCAD 2005, but I still find some problems when used with gradient fills. Also, draw order works only in the same space, model or paper space; this means you cannot control the display order of a paper space object relative to a model space object.

AutoCAD 2005 adds these controls for draw order:

TextToFront - brings all text and/or dimensions to the front of the drawing's display order.
HpDrawOrder - move hatch patterns in front or behind their boundaries and other objects.
DrawOrderCtl - controls how draw order changes when objects are edited, and toggles draw order inheritance.

Finding the Commands
TextToFront Command

To start the TextToFront command:
• From the Tools menu, select Draw Order, and then Bring Text and Dimensions to Front.
• At the command prompt, enter the texttofront command.
In all cases, AutoCAD displays prompts at the command line.

HpDrawOrder System Variable

To access the HpDrawOrder system variable:
• At the command prompt, enter hpdraworder as a command.
• Alternatively, use the BHatch command to open the Boundary Hatch dialog box. In the Draw Order drop list, select an option.
• Or, use the -BHatch command and its DRaw Order options.

DrawOrderCtl System Variable

To access the DrawOrderCtl system variable:
• At the command prompt, enter draworderctl as a command.

Step-by-Step Tutorials
TextToFront Command
To bring text and/or dimensions to the front of the display order, follow these steps:

1. With AutoCAD 2005, open the texttofront.dwg file. Notice that the solid areas cover the text and dimension.


Figure 1: Solid areas obscure the text and dimension.

2. Start the TextToFront command. Notice the prompts at the command line. You can select text or dimensions or both. Note that this command automatically selects all text (and all dimensions) in the drawing; if you want to pick and choose, use the DrawOrder command instead.

Command: texttofront
Bring to front [Text/Dimensions/Both] <Both>: b
2 object(s) brought to front.

3. For this tutorial, enter the b option (short for "Both" -- both text and dimensions), and then press enter. Notice that the text and dimension are no longer hidden, but can be read plainly.


Figure 2: Text and dimensions can now be read.

TIP: The purpose of the TextToFront command is to make it easier to read text and dimensions in crowded drawings. As an alternative, you can apply a background to mtext and dimension text, using the Background Mask feature introduced in AutoCAD 2005. (In the Dimension Style Manager's Text tab, the option is called "Fill Color.") These options place colored rectangle behind the text.

HpDrawOrder System Variable
The HpDrawOrder system variable determines whether hatch patterns are displayed in front of, or behind, the boundaries and other objects in drawings. You set these options with the system variable, or through the Boundary Hatch dialog box, or the -BHatch command's DRaw order option.

The system variable accepts these values:

HpDrawOrder

Boundary Hatch Dialog Box

Meaning


0

None.

Hatch does not have a draw order

1

Send to back.

Hatch is displayed behind all other objects.

2

Bring to front.

Hatch is displayed in front of all other objects.

3

Send behind boundary.

Hatch is displayed behind its boundary.

4

Bring in front of boundary.

Hatch is in front of its boundary.

(I use the word "hatch" generically: it also applies to fill patterns placed with AutoCAD's hatching commands, but not the fill used by polylines and other thick objects.)

To force hatch patterns to display in front (or behind) other objects, follow these steps:

1. With AutoCAD 2005, start a new drawing. Draw some circles, and then fill one with a hatch pattern using the BHatch command. Exit the Boundary Hatch dialog box.

2. Double-click the hatch pattern. Notice the Hatch Edit dialog box. On the right side is the Draw Order drop list.


Figure 3: Selecting draw order for the selected hatch pattern.

3. From the Draw Order drop list, select Send to Back, and then click OK. Notice that you can see the other circles on top of the hatch.


Figure 4: Hatch moved to the back of the draw order.

4. Double-click the hatch again. This time select Send to Front, and then click OK. Notice that the hatch now covers all circles.


Figure 5: Hatch moved to the front of the draw order.

DrawOrderCtl System Variable
The DrawOrderCtl system variables lets you control how draw order is handled during these editing operations:

Creating new objects from existing ones. Some of AutoCAD's commands create new objects from existing ones, such as Offset (creates parallel objects) and Chamfer (creates chamfer lines). The new objects have the same draw order as the original object selected first. This is called "inheritance." This new system variable lets you toggle (turn on or off) inheritance.

Editing objects. When you use AutoCAD's editing commands, such as Rotate and Lengthen, the edited objects are displayed on top of all objects during the editing operation. Following editing, AutoCAD performs a partial regeneration to return the objects to their correct draw order. Because this can increase the editing time, this new system variable lets you toggle regeneration.

The system variable accepts the following values:

DrawOrderCtl

Meaning

0

Following editing, objects remain on top of the display order until the next Regen command.
Turns off draw order inheritance.

1

After editing, objects are automatically displayed with their draw order.

2

Turns on draw order inheritance.

3

Turns on correct draw order following editing, and turns on draw order inheritance.

Take the Quiz!

Previous Topics