- •Contents
- •Contents at a Glance
- •Acknowledgments
- •Preface
- •Is This Book for You?
- •How This Book Is Organized
- •How to Use This Book
- •Doing the Exercises
- •Conventions Used in This Book
- •What the Icons Mean
- •About the CD-ROM
- •Other Information
- •Contacting the Author
- •Foreword
- •Credits
- •About the Author
- •Summary
- •AutoCAD’s Advantages
- •Comparing AutoCAD and AutoCAD LT
- •Starting AutoCAD and AutoCAD LT
- •Creating a New Drawing
- •Using the AutoCAD and AutoCAD LT Interface
- •Creating a New Folder
- •Using the Interface
- •Saving a Drawing
- •Closing a Drawing and Exiting from AutoCAD and AutoCAD LT
- •Summary
- •Creating a New Drawing from a Template
- •Working with Templates
- •Opening a Drawing with Default Settings
- •Opening an Existing Drawing
- •Using an Existing Drawing as a Prototype
- •Saving a Drawing Under a New Name
- •Summary
- •The Command Line and Dynamic Input
- •Command Techniques
- •Of Mice and Pucks
- •Getting Help
- •Summary
- •Typing Coordinates
- •Displaying Coordinates
- •Picking Coordinates on the Screen
- •Overriding Coordinate Settings
- •Locating Points
- •Summary
- •Choosing Unit Types
- •Drawing Limits
- •Understanding Scales
- •Creating a Title Block
- •Specifying Common Setup Options
- •Customizing with the MVSETUP Command
- •Using the Setup Wizards
- •Summary
- •Using the LINE Command
- •Drawing Rectangles
- •Drawing Polygons
- •Creating Construction Lines
- •Creating Rays
- •Summary
- •Drawing Circles
- •Drawing Arcs
- •Creating Ellipses and Elliptical Arcs
- •Making Donuts
- •Placing Points
- •Summary
- •Panning
- •Using the ZOOM Command
- •Using Aerial View
- •Saving Named Views
- •Working with Tiled Viewports
- •Using Snap Rotation
- •Understanding User Coordinate Systems
- •Creating Isometric Drawings
- •Summary
- •Editing a Drawing
- •Selecting Objects
- •Summary
- •Copying and Moving Objects
- •Resizing Commands
- •Using Construction Commands
- •Creating a Revision Cloud
- •Hiding Objects with a Wipeout
- •Double-Clicking to Edit Objects
- •Grips
- •Editing with the Properties Palette
- •Selection Filters
- •Groups
- •Summary
- •Working with Layers
- •Changing Object Color, Linetype, and Lineweight
- •Working with Linetype Scales
- •Importing Layers and Linetypes from Other Drawings
- •Matching Properties
- •Summary
- •Drawing-Level Information
- •Object-Level Information
- •Measurement Commands
- •AutoCAD’s Calculator
- •Summary
- •Creating Single-Line Text
- •Understanding Text Styles
- •Creating Multiline Text
- •Creating Tables
- •Inserting Fields
- •Managing Text
- •Finding Text in Your Drawing
- •Checking Your Spelling
- •Customizing the spelling dictionary
- •Summary
- •Working with Dimensions
- •Drawing Linear Dimensions
- •Drawing Aligned Dimensions
- •Creating Baseline and Continued Dimensions
- •Dimensioning Arcs and Circles
- •Dimensioning Angles
- •Creating Ordinate Dimensions
- •Drawing Leaders
- •Using Quick Dimension
- •Editing Dimensions
- •Summary
- •Understanding Dimension Styles
- •Defining a New Dimension Style
- •Changing Dimension Styles
- •Creating Geometric Tolerances
- •Summary
- •Creating and Editing Polylines
- •Drawing and Editing Splines
- •Creating Regions
- •Creating Boundaries
- •Creating Hatches
- •Creating and Editing Multilines
- •Creating Dlines
- •Using the SKETCH Command
- •Digitizing Drawings with the TABLET Command
- •Summary
- •Preparing a Drawing for Plotting or Printing
- •Creating a Layout in Paper Space
- •Working with Plot Styles
- •Plotting a Drawing
- •Summary
- •Combining Objects into Blocks
- •Inserting Blocks and Files into Drawings
- •Managing Blocks
- •Creating and Using Dynamic Blocks
- •Using Windows Features
- •Working with Attributes
- •Summary
- •Understanding External References
- •Editing an Xref within Your Drawing
- •Controlling Xref Display
- •Managing Xrefs
- •Summary
- •Preparing for Database Connectivity
- •Connecting to Your Database
- •Linking Data to Drawing Objects
- •Creating Labels
- •Querying with the Query Editor
- •Working with Query Files
- •Summary
- •Working with 3D Coordinates
- •Using Elevation and Thickness
- •Working with the User Coordinate System
- •Summary
- •Working with the Standard Viewpoints
- •Using DDVPOINT
- •Working with the Tripod and Compass
- •Displaying a Quick Plan View
- •Shading Your Drawing
- •Using 3D Orbit
- •Using Tiled Viewports
- •Defining a Perspective View
- •Laying Out 3D Drawings
- •Summary
- •Drawing Surfaces with 3DFACE
- •Drawing Surfaces with PFACE
- •Creating Polygon Meshes with 3DMESH
- •Drawing Standard 3D Shapes
- •Drawing a Revolved Surface
- •Drawing an Extruded Surface
- •Drawing Ruled Surfaces
- •Drawing Edge Surfaces
- •Summary
- •Drawing Standard Shapes
- •Creating Extruded Solids
- •Drawing Revolved Solids
- •Creating Complex Solids
- •Sectioning and Slicing Solids
- •Using Editing Commands in 3D
- •Editing Solids
- •Listing Solid Properties
- •Summary
- •Understanding Rendering
- •Creating Lights
- •Creating Scenes
- •Working with Materials
- •Using Backgrounds
- •Doing the Final Render
- •Summary
- •Accessing Drawing Components with the DesignCenter
- •Accessing Drawing Content with Tool Palettes
- •Setting Standards for Drawings
- •Organizing Your Drawings
- •Working with Sheet Sets
- •Maintaining Security
- •Keeping Track of Referenced Files
- •Handling Errors and Crashes
- •Managing Drawings from Prior Releases
- •Summary
- •Importing and Exporting Other File Formats
- •Working with Raster Images
- •Pasting, Linking, and Embedding Objects
- •Summary
- •Sending Drawings
- •Opening Drawings from the Web
- •Creating Object Hyperlinks
- •Publishing Drawings
- •Summary
- •Working with Customizable Files
- •Creating Keyboard Shortcuts for Commands
- •Customizing Toolbars
- •Customizing Tool Palettes
- •Summary
- •Creating Macros with Script Files
- •Creating Slide Shows
- •Creating Slide Libraries
- •Summary
- •Creating Linetypes
- •Creating Hatch Patterns
- •Summary
- •Creating Shapes
- •Creating Fonts
- •Summary
- •Working with the Customization File
- •Customizing a Menu
- •Summary
- •Introducing Visual LISP
- •Getting Help in Visual LISP
- •Working with AutoLISP Expressions
- •Using AutoLISP on the Command Line
- •Creating AutoLISP Files
- •Summary
- •Creating Variables
- •Working with AutoCAD Commands
- •Working with Lists
- •Setting Conditions
- •Managing Drawing Objects
- •Getting Input from the User
- •Putting on the Finishing Touches
- •Summary
- •Understanding Local and Global Variables
- •Working with Visual LISP ActiveX Functions
- •Debugging Code
- •Summary
- •Starting to Work with VBA
- •Writing VBA Code
- •Getting User Input
- •Creating Dialog Boxes
- •Modifying Objects
- •Debugging and Trapping Errors
- •Moving to Advanced Programming
- •Summary
- •A Final Word
- •Installing AutoCAD and AutoCAD LT
- •Configuring and Using Workspaces
- •Configuring AutoCAD
- •Starting AutoCAD Your Way
- •Configuring a Plotter
- •Discovering AutoCAD and AutoCAD LT
- •Accessing Technical Support
- •Autodesk User Groups
- •Internet Resources
- •System Requirements
- •Using the CD-ROM with Microsoft Windows
- •What’s on the CD-ROM
- •Troubleshooting
- •Index
Chapter 12 Obtaining Information from Your Drawing |
313 |
Figure 12-18: You can use the QUICKCALC command to calculate the intersection of two lines without drawing the lines.
9. Save your drawing.
Summary
A great deal of information is available to you in each drawing. In this chapter you read about:
Getting a general status listing
Listing system variable settings
Tracking drawing time
Getting information about individual objects by using the LIST, DIST, and ID commands
Calculating area and perimeters
Using the Properties palette to display all of an object’s properties
Dividing and measuring objects by placing point objects along them
Using AutoCAD’s QuickCalc calculator to use calculated results as part of your command input
In the next chapter, I explain how to create and edit text.
|
|
|
Creating Text
Every drawing includes text that labels or explains the objects in the drawing; this text is often called annotation. In each release,
the capabilities of the text feature have improved so that you can now easily format and edit text to provide a professional appearance to your drawing. A wide range of font, alignment, and spacing options is available. You can also import text from a word processor. This chapter tells you all that you need to know about creating text in AutoCAD and AutoCAD LT.
Creating Single-Line Text
A great deal of text in a drawing consists of short labels or comments. Use single-line text when you want each line of text to be a separate object or when you’re creating a small amount of text. Single-line text has fewer options than the multiline text that I explain later in this chapter, but it’s easy to create and to accurately place in a drawing.
It is very easy to create a single line of text using the defaults, such as font and height. Choose Draw Text Single Line Text. This starts the DTEXT command. DTEXT stands for dynamic text, which means that you can see the text on the screen as you type it. Follow the prompts:
Current text style: “Standard” Text height: 0.2000
Specify start point of text or [Justify/Style]: Pick a start point for the text.
Specify height <0.2000>: Type a height, or press Enter to accept the default.
Specify rotation angle of text <0>: Type a rotation angle, or press Enter to accept the default.
Enter text: Type one line of text. Press Enter when you are finished.
Enter text: Press Enter to end the command or click outside the editor window.
Note You cannot use the Return button of the mouse or the Spacebar to end the command.
13C H A P T E R
In This Chapter
Creating and editing single-line text
Understanding text styles
Creating, editing, and formatting multiline (paragraph) text
Creating tables
Automating with fields
Managing text to improve performance
Using the FIND command
Checking spelling
The next section covers the Justify option. The Style option is discussed later in this chapter.
316 Part II Drawing in Two Dimensions
DTEXT continues to prompt you for lines of text so that you can type line after line. Unfortunately, you cannot control the spacing between the lines.
On the
CD-ROM
It (for the TEXT command) and Idt (for DTEXT) allow you to specify the spacing between lines of text as you create them. Look in \Software\Chap13\It. Txtstack, in \Software\ Chap13\txtstack, adjusts spacing between lines of single-line text. These programs work only in AutoCAD. (Thanks to Leonid Nemirovsky, http://home.pacifier.com/~nemi, for creating It.lsp and Idt.lsp at my request.)
One advantage of DTEXT is that each line of text is a separate object, making it easy to move or copy individual lines of text.
DTEXT remembers the location of the previous line of text even if you’ve used other commands in the meantime. To continue text below the last line of text that you have created, press Enter at the Specify start point of text or [Justify/Style]: prompt.
Cross- |
You can also create text connected to arrows that point to objects, using the LEADER and |
Reference |
QLEADER commands. Chapter 14 covers the QLEADER command. |
|
Justifying single-line text
When you pick a start point for text, the relationship between the start point and the actual letters is determined by the justification. The start point is also called the insertion point. When you want to refer to text by using object snaps, you use the Insertion object snap. If you select text without first choosing a command, grips appear at the insertion point as well as the bottom-left corner.
By default, text is left-justified. To change the text’s justification, right-click and choose Justify at the Specify start point of text or [Justify/Style]: prompt. The command responds with this bewildering prompt:
Enter an option [Align/Fit/Center/Middle/Right/TL/TC/TR/ML/MC/MR/BL/BC/BR]:
Align and Fit offer two ways to fit text into a specified space. Both respond with the same two prompts:
Specify first endpoint of text baseline:
Specify second endpoint of text baseline:
Specify the beginning and the end of the text line. Align then prompts you for the text and squeezes or stretches the text to fit within the text line. The height of the text changes accordingly, to maintain the proportions of the font.
Fit adds the Specify height <0.2000>: prompt. Type the height that you want and then type the text. Fit also squeezes or stretches the text to fit within the text line, but maintains the text height that you specified, distorting the font letters to fit the space. Figure 13-1 shows an example of normal, aligned, and fitted single-line text.
Chapter 13 Creating Text 317
Figure 13-1: Normal (left-justified), aligned, and fitted text.
The other justification options are listed in Table 13-1. They specify the placement of the text’s insertion point in relation to the text line. Each insertion point is marked with a small x.
Table 13-1: Text Justification Options
Example |
Option |
Description |
|
|
|
|
Left |
Because this is the default justification, there is no sub-option for |
|
|
left-justification when you choose the Justify option. The insertion |
|
|
point is on the baseline. |
|
Center |
Text is centered around the insertion point. The insertion point is |
|
|
on the baseline. |
|
Right |
Text is right-justified from the insertion point. The insertion point is |
|
|
on the baseline. |
|
Middle |
Text is centered both vertically and horizontally. The vertical center |
|
|
point is measured from the bottom of the lowest to the top of the |
|
|
tallest possible letter. |
|
Top Left |
Text is left-justified, and the insertion point is at the top of the |
|
|
highest possible letter. For some fonts, the insertion point appears |
|
|
slightly above the highest letter; for others, it appears exactly at |
|
|
the top. |
|
Top Center |
Text is centered, and the insertion point is at the top of the highest |
|
|
possible letter. |
|
Top Right |
Text is right-justified, and the insertion point is at the top of the |
|
|
highest possible letter. |
|
Middle Left |
Text is left-justified and centered vertically. The vertical center point |
|
|
is measured from the bottom of the lowest to the top of the tallest |
|
|
possible letter. |
|
Middle Center |
Text is centered both horizontally and vertically. The vertical center |
|
|
point is measured from the bottom of the lowest to the top of the |
|
|
tallest possible letter. |
|
Middle Right |
Text is right-justified and centered vertically. The vertical center |
|
|
point is measured from the bottom of the lowest to the top of the |
|
|
tallest possible letter. |
Continued
318 Part II Drawing in Two Dimensions
Table 13-1: Text Justification Options
Example |
Option |
Description |
|
|
|
|
Bottom Left |
Text is left-justified. The insertion point is below the lowest |
|
|
descending letter. For some fonts, the insertion point appears |
|
|
slightly below the lowest letter; for others, it appears exactly at |
|
|
the bottom. |
|
Bottom |
Text is centered. The insertion point is below the lowest |
|
Center |
descending letter. |
|
Bottom |
Text is right-justified. The insertion point is below the lowest |
|
Right |
descending letter. |
|
|
|
Tip |
If you know the option abbreviation of the justification that you want, you can use it at the |
|
Specify start point of text or [Justify/Style]: prompt. |
If you choose a justification that centers or right-justifies, the text does not appear with the proper justification until after you press Enter for the second time and return to the command prompt.
Setting the height
Setting the height of text is fairly straightforward. The default is 0.2 units, although this is not suitable for all applications. The main point to consider is the scale factor. If you’re drawing a house and plan to plot it at 1"=8' (1=96), you need to figure out how big to make the text so that you can still read it when it is scaled down.
For example, if you want the text to be 0.2 units high and your scale factor is 96, your text needs to be 19.2 inches high (0.2×96). On the other hand, if you’re drawing a very small object, such as a computer chip, and your scale is 0.10, then your text needs to be 0.02 inches high. The dimension text in Figure 13-2 is 5 inches high, but at a scale factor of 64, it plots at 5⁄64 inches high.
AutoCAD and AutoCAD LT calculate text height in units. Most word processors calculate text height in points. A point is 1⁄72 of an inch. Therefore, 12-point text, a standard for most business letters, is about 0.17 inches high. The default of 0.2 units, if you’re using inches as your unit, is just over 14 points, which is usually appropriate for annotating a drawing. (You don’t usually hold a drawing as close as you would a letter, so a larger point size is appropriate.)
For more information about changing the scale of text, see the section “Editing single-line text” later in this chapter.
Chapter 13 Creating Text 319
Figure 13-2: The dimension text in this drawing is 5 inches high.
Setting the rotation angle
The final prompt in DTEXT is the rotation angle. This angle applies to the entire line of text, not to individual characters. (You can specify slanted text, called obliqued text, using the STYLE command covered later in this chapter.) Figure 13-3 shows text rotated to 315 degrees.
Figure 13-3: Text rotated to 315 degrees.
Adding special characters and formatting
The DTEXT command does not offer the same type of formatting options that are available for paragraph text (covered later in this chapter). Therefore, you have to use codes to create special characters and formats. These codes are shown in Table 13-2.
320 Part II Drawing in Two Dimensions
Table 13-2: Special Character Codes for Text Fonts
Code Results
%%o Toggles the overscore mode on/off.
%%u Toggles the underscore mode on/off.
%%d Draws a degree symbol (°).
%%p Draws a plus/minus tolerance symbol (±).
%%c Draws a circle-diameter dimensioning symbol ( ).
Figure 13-4 displays text using some of these codes, along with the entries that created them.
|
%%u35.3%%u not 35.8 Figure 13-4: Using special characters and |
|
formatting with text fonts. |
|
%%c1.5 |
|
%%p.002 |
On the |
The drawing used in the following exercise on creating text with DTEXT, 13-a.dwg, is in the |
CD-ROM |
Drawings folder on the CD-ROM. |
STEPS: Creating Text with DTEXT
1.Open ab13-a.dwg from your CD-ROM.
2.Save the file as ab13-01.dwg in your AutoCAD Bible folder. This is a master-bathroom plan drawing, as shown in Figure 13-5. Make sure that OSNAP is on. Set running object snaps for endpoint, midpoint, and intersection.
3.Choose Draw Text Single Line Text. Follow the prompts:
Current text style: “ROMANS” Text height: 0'-4 1/2"
Specify start point of text or [Justify/Style]: Right-click and choose Justify.
Enter an option [Align/Fit/Center/Middle/Right/TL/TC/TR/ML/MC/MR/BL/BC/BR]: Rightclick and choose BC.
Specify bottom-center point of text: Use the Midpoint running object snap to pick 1 in Figure 13-5.
Specify rotation angle of text <0>: Pick the endpoint at 2. Enter text: 2-0
Enter text:
Chapter 13 Creating Text 321
2 |
3 |
|
|
1 |
|
Figure 13-5: The master bathroom.
4.Start the DTEXT command again. Follow the prompts:
Specify start point of text or [Justify/Style]: Right-click and choose Justify.
Enter an option [Align/Fit/Center/Middle/Right/TL/TC/TR/ML/MC/MR/BL/BC/BR]: Rightclick and choose Middle.
Specify middle point of text: Pick 3 in Figure 13-5. (This point
doesn’t have to be exact.)
Specify rotation angle of text <45>: 0
Enter text: %%UMASTER BATH
Enter text:
5.Save your drawing. It should look like Figure 13-6.
Figure 13-6: The master-bathroom plan drawing with added single-line text.
322 Part II Drawing in Two Dimensions
Using the TEXT command
The TEXT command was the original command for creating text. DTEXT was an update, showing the characters on your screen as you typed. The relationship between these commands is as follows:
When used in a drawing, the TEXT and DTEXT commands function identically.
You can type -text on the command line to use the original TEXT behavior, which ends the command after one line of text.
Only the TEXT command works in script files, menus, or AutoLISP routines. (See Parts VI and VII of this book for more information.)
Editing single-line text
As with any drawing object, the need often arises to edit your text. You can edit single-line text in two ways.
The most common way to edit single-line text is to use the DDEDIT command. Double-click the text. Remember that each line of text created with DTEXT or TEXT is a separate object.
New |
You can now edit single-line text in its place in your drawing, rather than in a dialog box. If you |
Feature |
want to use the old Edit Text dialog box, you can do so by changing the new DTEXTED system |
|
|
|
variable to 1. The default value is 0, which provides in-place editing with no dialog box. |
The text appears in a border with your text highlighted in an edit box, as shown in Figure 13-7. You can start typing to completely replace the text or click where you want to change part of the text and use standard Windows techniques to edit the text. Press Enter or click anywhere outside the border. DDEDIT prompts you to select another annotation object. Press Enter to end the command.
Figure 13-7: Editing single-line text in place in the drawing.
New |
Because the Edit Text dialog box no longer exists, you may find other nearby or overlapping |
Feature |
objects to be distracting. If so, right-click and choose Opaque Background to create an |
|
|
|
opaque background inside the editing border while you edit. |
Chapter 13 Creating Text 323
You can also change text using the Properties palette. Select any text object and click Properties on the Standard toolbar to open the Properties palette. Here you can edit the text content as well as every other conceivable property, including layer, linetype, lineweight, color, insertion point, justification, rotation angle, and several other properties that I cover in the next section on text styles.
Scaling text
You can use the SCALETEXT command to change the scale of selected text without moving the text insertion point. This command works with either one text object or several at once. All of the text objects stay in their original location.
To use SCALETEXT, follow these steps:
1.Choose Modify Object Text Scale.
2.Select the text objects that you want to scale.
3.At the Enter a base point option for scaling [Existing/Left/Center/Middle/ Right/TL/TC/TR/ML/MC/MR/BL/BC/BR] <Existing>: prompt, press Enter to use the existing insertion point of the selected text, or choose a new base point. (Your last
choice for this prompt becomes the new default, so if you used another option, type
e .) These options are the same as the Justify options described earlier in this chapter.
4.At the Specify new height or [Match object/Scale factor] <3/32>: prompt, rightclick and choose Scale factor to specify a scale factor, just as you would for the SCALE command (see Chapter 9). You can also type a new height or use the Match Object option to match the height of the selected text objects to another existing text object. The prompt asks you to select an object with the desired height.
5.If you have chosen the Scale Factor option, then type the factor that you want at the
Specify scale factor or [Reference] <2>: prompt.
6.If you want to specify the scale factor with reference to existing text or a value, use the Reference option. At the Specify reference length <1>: prompt, type a length or specify two points that measure the reference length. At the Specify new length: prompt, type a value or pick two points to indicate the new length.
Justifying text
The JUSTIFYTEXT command lets you change the justification of selected text objects without moving the text. To use JUSTIFYTEXT, choose Modify Object Text Justify. Then select the text objects that you want to modify. At the Enter a justification option [Left/ Align/Fit/Center/Middle/Right/TL/TC/TR/ML/MC/MR/BL/BC/BR] <Left>: prompt, right-click and choose the justification that you want.
On the |
The drawing used in the following exercise on editing text, ab13-b.dwg, is in the Drawings |
CD-ROM |
folder on the CD-ROM. |
|
STEPS: Editing Text
1.Open ab13-b.dwg from your CD-ROM.
2.Save the file as ab13-02.dwg in your AutoCAD Bible folder. This is an air and vacuum release valve, as shown in Figure 13-8.
324 Part II Drawing in Two Dimensions
3.Double-click the text 1/2" piping. A highlighted border appears around the text. Select only the text 1/2 and type 3/8. Press Enter or click anywhere outside the text border. The DDEDIT prompt continues to prompt you to select another annotation object. Press Enter to end the command.
4.Choose Properties from the Standard toolbar. Click Quick Select in the Properties palette. In the Quick Select dialog box, choose Text from the Object Type drop-down list. In the Operator drop-down list, choose Select All. Click OK to select all of the text objects in the drawing.
Figure 13-8: An air and vacuum release valve.
Thanks to the Army Corps of Engineers for this drawing.
5.Choose Layer. From the Layer drop-down list, choose TEXT. Choose Color. From the Color drop-down list, choose ByLayer. All text is now on the TEXT layer using the ByLayer color. Press Esc to remove the grips and see the result.
6.Select the text at the bottom of the drawing that reads N.T.S. From the grips you can tell
that it has a middle-left justification. Choose Modify Object Text Justify, or type justifytext on the command line. At the prompt, type bc .
The command ends. You can select the text again to see that the insertion point grip is now at the bottom-center of the text.
7.Choose Modify Object Text Scale, or type scaletext on the command line. Follow the prompts:
Select objects: Select the two lines of text at the bottom of the
drawing.
Select objects:
Enter a base point option for scaling
[Existing/Left/Center/Middle/Right/TL/TC/TR/ML/MC/MR/BL/BC/BR] <BC>:
Type e to use the existing base point.
Specify new height or [Match object/Scale factor] <1/8">: Right-click
and choose Scale factor.
Specify scale factor or [Reference] <2">: Type 1.5 .
8.You can click the Properties palette’s Close button to close it. Save your drawing.
