Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Книги_AutoCad_2 / AutoCAD 2006 and AutoCAD LT 2006 Bible_2004г__.pdf
Скачиваний:
142
Добавлен:
09.04.2015
Размер:
17.83 Mб
Скачать

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.

Соседние файлы в папке Книги_AutoCad_2