- •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
584 Part III Working with Data
Summary
In this chapter, I covered all of the ways that you can use blocks and attributes in your drawings. You read about:
Combining objects into blocks in your drawings so that you can edit them as a unit
Inserting blocks at any scale and rotation
Saving a block as a file
Inserting blocks with the INSERT command
Using the DesignCenter to import blocks from other drawings
Creating and inserting dynamic blocks
Copying objects by using the Windows Clipboard and drag-and-drop
Using attributes to place text and to create simple databases
Defining attributes
Inserting blocks with attributes and assigning values to the attributes
Extracting attribute data in both AutoCAD and AutoCAD LT
In the next chapter, I explain how to insert references (xrefs) to other files in your drawings.
|
|
|
Referencing Other
Drawings
Sometimes you need to refer to another drawing without inserting it. You may want to use part of another drawing as an example
for your current drawing, or to see how the model in your drawing fits in with models in other drawings. Using an external reference is like laying one drawing on top of another and being able to see both at the same time.
Understanding External References
External references, commonly called xrefs, enable you to view any drawing as a reference while in your current drawing. The external drawing is not part of your current drawing. The current drawing keeps track of the location and name of an external reference so that you can always reference it easily. As with blocks, you can snap to objects in the external reference, thereby using it as a reference for the drawing process. You can also change the visibility settings of the xref’s layers.
Xrefs have several advantages over blocks:
Xrefs keep your drawing smaller than blocks. The externally referenced drawing doesn’t become part of your drawing. Your drawing maintains only a reference (name and location) to the other drawing.
You always have the most updated version of the xref. Each time that you open a drawing, a current copy of the xref loads. By contrast, you would need to reinsert a file inserted as a block to see the most updated version.
In a team project, several people can use the same drawing as an xref, each having access to the latest changes.
Xrefs can be attached and detached easily for maximum flexibility, or overlaid for temporary use. For example, you may not want the xref to be part of your drawing. If you’re using only the xref for reference, you may detach it before plotting.
Attaching an external reference
The first step is to attach the external reference, which is just another drawing, to your current (host) drawing. When working with xrefs, you may find it useful to use the Reference toolbar. To open the Reference toolbar, right-click any toolbar and choose Reference.
19C H A P T E R
In This Chapter
Understanding external references
Attaching
external references
Editing external references from within your drawing
Controlling the display of external references
Managing external references
586 Part III Working with Data
To attach an xref, follow these steps:
1.Choose External Reference from the Reference toolbar (or choose Insert
Xref Manager) to start the XREF command. The Xref Manager (shown in Figure 19-1)
opens. It is your one-stop shopping mall for external references. This dialog box enables you to manage all of your xrefs in one place.
If you don’t have any xrefs in use in a drawing, then the Xref Manager dialog box is blank. If you do have xrefs in your drawing, this screen shows your current external references.
Figure 19-1: The Xref Manager.
2.To attach an external reference, choose Attach in the Xref Manager to open the Select Reference File dialog box. (You can get to this dialog box directly using the XATTACH command.) Choose the file you want to attach and click Open. The External Reference dialog box (shown in Figure 19-2) opens. The dialog box displays the file that you chose along with its path (location).
Figure 19-2: The External Reference dialog box.
Chapter 19 Referencing Other Drawings 587
Note
Tip
3.Choose the type of xref that you want in the Reference Type section:
•Attachment: Use an attachment when you want to be sure that the xref will be displayed if someone else xrefs your current drawing. In other words, that person will see your current drawing, and your xref will be nested within it.
•Overlay: Use an overlay when you’re sharing drawings in a networked environment and you don’t want to change your drawing by attaching an xref. If someone else attaches your drawing while you’re working on it, the overlay is not displayed.
The XREFTYPE system variable determines which of these two choices, Attachment or Overlay, is automatically chosen in the Reference Type section. The default value, 0, uses the Attachment option.
4.From the Path Type drop-down list, choose the type of path that you want to use:
•Full path: Specifies the full path of the xref drawing, including the drive letter (such as c:).
•Relative path: Specifies only part of the xref drawing’s path, assuming the current drive or folder. This option enables you to move an xref to a different drive that has the same folder structure.
•No path: Uses the current folder of the host drawing. This option enables you to use an xref when you move the drawing, for example, when you send it to someone else with a different folder structure. To make sure that the drawing can find the xref, ensure that it is in the project files search path.
5.Use the bottom half of the dialog box to specify the insertion point, the X, Y, and Z scale factors, and the rotation angle, either in the dialog box or on-screen. These prompts are the same ones that you use when inserting a block or file.
A check box in the Scale section lets you specify the use of a uniform scale, so the Y and Z values are always the same as the X value.
6. Click OK to attach the xref.
If your current view does not show the entire xref, do a ZOOM Extents.
Cross- |
You can also attach an xref from a tool palette. For more information on tool palettes, see |
Reference |
Chapter 26. |
|
After you have the xref in your drawing, you can start to work. The xref is like a block, although you cannot explode it. However, you can use object snaps on all of the objects in an xref, just as you can with blocks. This enables you to use the xref as a basis for your own drawing.
Opening an xref
Sometimes you need to open the xref to work on it directly. For example, you may see an error that you want to correct. The XOPEN command opens xrefs. (The XOPEN command is not available in AutoCAD LT.) The easiest way to use XOPEN is to click the xref to select it in your drawing, right-click, and choose Open Xref. The xref opens in its own window. If you look in the Xref Manager, the xref’s status is listed as Open.
You can also select the file in the Xref Manager and click Open. When you click OK to close the Xref Manager, the xref drawing opens.
588 Part III Working with Data
Viewing xref relationships
To see what type of xrefs you have in your drawing, choose External Reference from the Reference toolbar or Insert Xref Manager. The external references are listed in the Xref Manager. You can choose one of two views:
List view lists all of the xrefs along with their status, size, type, date, and time saved, as well as the saved path, if any.
Tree view lists all of the xrefs in a graphical view that shows their relationships. This view is great for understanding nested xrefs.
When you insert a block that has an attached xref, the xref is maintained.
Note You can change the width of the columns in List view by placing the cursor on a column dividing line until it changes to a two-headed arrow. Then drag in either direction.
When you click any xref, the Xref Found At box displays the location of the xref.
If the Xref Manager cannot find a drawing, it helps to know where it searches for xrefs. The Xref Manager searches for xrefs according to a specific order:
Path specified: Locates the specified path xref.
Current folder: Locates the current folder of the host drawing.
Project path: To check or change the project path, choose Tools Options and click the Files tab. Double-click Project Files Search Path. Click Add and then click Browse to navigate to a folder where you keep drawings that you may want to use as xrefs.
(AutoCAD LT doesn’t offer the Project Files Search Path.)
Support path: To check or change the support path, choose Tools Options and then click the Files tab. Double-click Support File Search Path. Click Add and then click Browse to navigate to a folder.
Start-in folder: To find the start-in folder, right-click your AutoCAD 2006 or AutoCAD LT 2006 desktop shortcut and choose Properties.
On the |
The drawings used in the following exercise on attaching xrefs, ab19-a.dwg and ab19- |
CD-ROM |
b.dwg, are in the Drawings folder on the CD-ROM. |
STEPS: Attaching Xrefs
1.Open ab19-a.dwg from the CD-ROM. This is the floor plan for a house. If the Reference toolbar is not displayed, right-click any toolbar and choose Reference.
2.Open Windows Explorer (right-click Start on the task bar and choose Explore). Copy ab19-b.dwg from the CD-ROM to your AutoCAD Bible folder.
3.In your drawing, choose External Reference Attach from the Reference toolbar. In the Select Reference File dialog box, choose ab19-b.dwg. Choose Open.
Chapter 19 Referencing Other Drawings 589
4.In the External Reference dialog box, you see the file name displayed. Make sure that all Specify On-Screen check boxes are unchecked, and click OK. You see ab19-b.dwg, which is a title block, in ab19-a.dwg.
5.Save the drawing as ab19-01.dwg in your AutoCAD Bible folder. Click the drawing’s Close box to close the drawing.
6.Start a new drawing using the acad.dwt or aclt.dwt template. Choose Format Units and choose Architectural. In the Units to Scale Drag-and-Drop Content drop-down list, choose Inches. Choose OK. Save it as ab19-02.dwg in your AutoCAD Bible folder.
7.Choose External Reference Attach from the Reference toolbar. In the Select Reference File dialog box, choose ab19-01.dwg, which you just saved in your AutoCAD Bible folder. Choose Open.
8.In the External Reference dialog box, you see the file name displayed. Leave the defaults and click OK. Choose Zoom Extents from the Zoom flyout on the Standard toolbar. You see ab19-01.dwg, which includes both the title block and the floor plan of the house in your new drawing. The title block drawing (ab19-b.dwg) is a nested xref in the floor plan (ab19-01.dwg) xref. You see the following message (press F2 to open the Text Window so you can see the message that scrolls by):
Attach Xref “ab19-01”: C:\AutoCAD Bible\ab19-01.dwg “ab19-01” loaded.
Attach Xref “ab19-b”: C:\AutoCAD Bible\ab19-b.dwg “ab19-b” loaded.
9.To help you visualize the relationships among the three drawings, choose External Reference from the Reference toolbar. The Xref Manager lists both drawings. Click
Tree View at the top of the dialog box. You now see the two xrefs listed in a tree structure, showing their relationship more clearly, as shown in Figure 19-3. Click Cancel.
Figure 19-3: Tree view shows nested xrefs clearly.
10. Save your drawing. It should look like Figure 19-4.
