- •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 13 Creating Text 349
Figure 13-23: The plat acreage table.
Inserting Fields
Most drawings contain information about the drawing, such as the last date it was revised, the person who saved the drawing, or the sheet number in a sheet set. Draft plots often contain additional information such as the time and drawing name. You may also want to insert information about drawing objects, such as the area or circumference of a circle. Fields are a way to insert this information into the drawing. You can also place fields in block attributes, which I discuss fully in Chapter 18. When your drawing changes, you can update the fields to keep them current.
Fields are not available in AutoCAD LT.
You can insert fields anywhere that you might normally use text. As you start using fields, you’ll think of many uses for them. You can format the text of a field in the same way that you format any multiline text.
On the |
Sfld creates custom fields. Look in \Software\Chap13\sfld. |
CD-ROM |
|
350 Part II Drawing in Two Dimensions
Creating fields
To create a new field as a multiline text object, you can use two methods:
Choose Insert Field.
Open the In-Place Text Editor or any other text box where you can enter text, right-click in the editor or text box, and choose Insert Field from the shortcut menu.
Whichever method you use, the Field dialog box opens, as shown in Figure 13-24.
Figure 13-24: Use the Field dialog box to choose, format, and insert a field into your drawing. Here you see the options for the Date field.
To insert the field, follow these steps:
1.Choose a field category from the Field Category drop-down list. You can use the All category to display all of the fields. The other categories help you to filter the fields, so that you can more easily find the field that you want.
2.From the Field Names list, choose the field that you want to use.
3.Depending on the field that you choose, you can usually select a format or example for the field. For example, you can choose a date format (such as m/d/yyyy) or a text format (such as title case).
4.Click OK.
•If you opened the Field dialog box by choosing Insert Field, the MTEXT command starts, and you see the Specify start point or [Height/Justify]: prompt. Pick a start point or use one of the options.
•If you started the MTEXT command first, the value of the field appears in the In-Place Text Editor. Click OK on the editor’s main toolbar to place the text.
Chapter 13 Creating Text 351
By default, fields appear in your drawing with a gray background. This background doesn’t plot. If you want, you can remove the background by choosing Tools Options and clicking the User Preferences tab. In the Fields section, uncheck the Display Background of Fields check box. Click OK to close the Options dialog box.
Note that there are two date-related fields. The CreateDate field creates a date based on the current date. This field does not change if you open the drawing on a future date. For example, you can use this field to show the last time a drawing was updated. The Date field always shows the current date.
The Document category of fields relates to data that you complete in the Properties dialog box. To complete this data, choose File Drawing Properties. The SheetSet category of fields is used with sheet sets. You can add a hyperlink to a field. For example, if your field refers to another sheet in a sheet set, the field can be a hyperlink that opens that other sheet.
Cross- |
I cover the Properties dialog box and sheet sets in Chapter 26. For more information about |
Reference |
hyperlinks, see Chapter 28. |
|
Figure 13-25 shows an example of a title block that uses fields.
Figure 13-25: Filling in a title block is easier when you use fields.
Editing and updating fields
To edit a field, double-click the field’s text to open the In-Place Text Editor. Select the text, right-click, and choose Edit field. The Field dialog box opens. You edit a field in the same way that you define the field originally. When you’re done, click OK. The field is reevaluated immediately. Close the In-Place Text Editor to place the edited field.
By default, a field is evaluated and updated, if necessary, whenever you open, save, plot, eTransmit, or regenerate a drawing. (See Chapter 28 for information on eTransmitting a drawing.) You can change when AutoCAD updates a field by choosing Tools Options and clicking the User Preferences tab. In the Fields section, click Field Update Settings. Check or uncheck the items that you want, and then click Apply & Close. Click OK to close the Options dialog box.
You can manually update a field if you want. For example, you may have an object field that displays the radius of a circle. If you resize the circle, you probably want to update the field.
To update a field, double-click the field to open the In-Place Text Editor. Select the text, rightclick, and choose Update Field. Close the In-Place Text Editor to return to your drawing.
352 Part II Drawing in Two Dimensions
|
Another method is to select the field and choose Tools Update Fields. You can select as |
|
many fields as you want. |
Tip |
To update all of the fields in a drawing, press Ctrl+A to select all of the objects in your |
|
drawing and choose Tools Update Fields. |
|
You can convert a field to text. Double-click the field to open the In-Place Text Editor. Select |
|
the text in the field, right-click and choose Convert Field to Text. |
|
What happens to fields when you open a 2006 drawing in a previous release of AutoCAD? |
|
The fields display at their last value in the 2006 drawing but are not updated. If you open an |
|
AutoCAD drawing with fields in AutoCAD LT, the fields display and update properly, unless |
|
you have changed the value of the FIELDEVAL system variable to disable updating in certain |
|
situations. |
On the |
The drawing used in the following exercise on using fields, ab13-d.dwg, is in the Drawing |
CD-ROM |
folder on the CD-ROM. |
|
STEPS: Using Fields
1.Open ab13-d.dwg from your CD-ROM. Save the file as ab13-07.dwg in your AutoCAD Bible folder. This drawing is zoomed in on the title block.
2.To set some of the drawing properties, choose File Drawing Properties. (I cover the Properties dialog box in Chapter 26.) On the Summary tab, type the following in the Title field: 6" thru 12" 2727 EPV Valves.
3.On the Custom tab, click Add. Enter the following two fields and values:
Drafter |
Enter your initials |
Dwg No |
SK-1972 |
4.Click OK to return to your drawing.
5.Choose Multiline Text from the Draw toolbar. Pick two boundary points within the Title box of the title block. The In-Place Text Editor opens. Right-click and choose Insert Field to open the Field dialog box.
6.From the Field Category drop-down list, choose Document. From the Field Names list, choose Title. From the Format list, choose Title Case. Click OK. Click anywhere outside the In-Place Text Editor to place the field.
7.Again choose Multiline Text from the Draw toolbar. Pick two boundary points within the Dwg No box of the title block. In the In-Place Text Editor, right-click and choose Insert Field to open the Field dialog box.
8.From the Field Names list, choose Dwg No. Click OK. Click anywhere outside the In-Place Text Editor to place the field.
9.Again choose Multiline Text from the Draw toolbar. Pick two boundary points within the Date box of the title block. In the In-Place Text Editor, right-click and choose Insert Field.
