Using External References (Xrefs)


Chapter 6 mentioned that careful use of blocks, external references (Xrefs), and layers can help you improve your productivity. In this section you will see firsthand how to use these features to help reduce design errors and speed up delivery of an accurate set of drawings. You do this by controlling layers in conjunction with blocks and external references to create a common drawing database for several drawings.

Preparing Existing Drawings for Cross-Referencing

Chapter 6 discussed how you can use Xrefs to assemble one floor of the apartment. In this section you will explore the creation and use of Xrefs to build multiple floors, each containing slightly different sets of drawing information. By doing so, you will learn how Xrefs enable you to use a single file in multiple drawings to save time and reduce redundancy. You'll see that by sharing common data in multiple files, you can reduce your work and keep the drawing information consistent.

You'll start by creating the files that you will use later as Xrefs:

  1.  On the CD       Open the Plan file. If you didn't create the Plan file, you can use the 12a-plan.dwg file from the companion CD (see Figure 12.24).

    click to expand
    Figure 12.24: The overall plan

  2. Turn off the Ceiling and Flr-pat layers to get a clear, uncluttered view of the individual unit plans.

  3. Use the Wblock command (enter W at the command prompt) and write the eight units in the corners of your plan to a file called Floor1.dwg (see Figure 12.25). When you select objects for the Wblock, be sure to include the door symbols for those units. Use 0,0 for the Wblock insertion base point. Also make sure that the Delete From Drawing check box is selected in the Write Block dialog box before you click OK.

    click to expand
    Figure 12.25: Units to be exported to the Floor1 file

  4. Using Figure 12.26 as a guide, insert Unit2 into the corners where the other eight units were previously.

    click to expand
    Figure 12.26: Insertion information for Unit2 . Metric coordinates are shown in brackets.

    Tip  

    If you didn't create the Unit2 file earlier in this chapter, use the 12cUnit2.dwg file from the companion CD.

  5. After you've accurately placed the corner units, use the Wblock command to write these corner units to a file called Floor2.dwg . Again, use the 0,0 coordinate as the insertion base point for the Wblock.

  6. Choose File   Save As to turn the remaining set of unit plans into a file called Common.dwg .

You've just created three files: Floor1 , Floor2 , and Common . Each of these files contains unique information about the building. Next , you'll use the Xref command to recombine these files for the different floor plans in your building.

Assembling External References to Build a Drawing

You will now create composite files for each floor, using external references of only the files needed for the individual floors. You will use the Attach option of the Xref command to insert all the files you exported from the Plan file.

Follow these steps to create a file representing the first floor:

  1. Close the Common.dwg file, open a new file, and call it Xref-1 .

  2. Set up this file as an architectural drawing 8 ½ ² 11 ² with a scale of 1 / 16 ² = 1 ¢ . The upper-right corner limits for such a drawing are 2112,1632. Metric users should set up a drawing at 1:200 scale on an A4 sheet size . Your drawing area should be 4200 cm by 5940 cm.

    Tip  

    In this exercise, you are asked to use a small paper size because it is the most common size available to readers. Normally, you would specify a larger size and scale for architectural drawings.

  3. Set the Ltscale value to 192. Metric users should set it to 200 .

  4. Open the Reference toolbar by right-clicking a toolbar and then selecting Acad   Reference from the shortcut menu.

  5. Click External Reference Attach on the Reference toolbar or type Xa to open the Select Reference File dialog box.

  6. Locate and select the Common.dwg file.

  7. In the External Reference dialog box, make sure the Specify On-Screen check box in the Insertion Point group is not selected. Then make sure the X, Y, and Z values in the Insertion Point group are all 0.

    click to expand
    Tip  

    Because the insertion points of all the files are the same, namely 0,0, they will fit together perfectly when they are inserted into the new files.

  8. Click OK. The Common.dwg file appears in the drawing.

  9. Click the External Reference Attach tool on the Reference toolbar again, and then click the Browse button to locate, select, and insert the Floor1 file.

  10.  On the CD      Repeat step 9 to insert the Col-grid.dwg file as an Xref. The Col-grid.dwg file can be found on the companion CD. You now have the plan for the first floor.

  11. Save this file.

Now use the current file to create another file representing a different floor:

  1. Choose File   Save As to save this file as Xref-2.dwg .

  2. Click the External Reference tool in the Reference toolbar or type Xr .

  3. In the Xref Manager dialog box, highlight Floor1 in the list of Xrefs and then click Detach.

    click to expand
  4. Click Attach.

  5. Locate and select Floor2.dwg .

  6. In the External Reference dialog box, make sure that the X, Y, and Z values in the Insertion Point group are all set to 0.

  7. Click OK. The Floor2 drawing appears in place of Floor1 .

    Warning  

    If you move an external reference file after you insert it into a drawing, AutoCAD may not be able to find it later when you attempt to open the drawing. If this happens, you can click the Browse button in the External Reference dialog box to tell AutoCAD the new location of the external reference file.

Now when you need to make changes to Xref-1 or Xref-2 , you can edit their individual external reference files. Then, the next time you open either Xref-1 or Xref-2 , the updated Xrefs will automatically appear in their most recent forms.

External references do not need to be permanent. As you saw in the previous exercise, you can attach and detach them easily at any time. This means that if you need to get information from another file ”to see how well an elevator core aligns, for example ”you can temporarily attach as an external reference the other file to quickly check alignments and then detach it when you are finished.

Think of these composite files as final plot files that are used only for plotting and reviewing. You can then edit the smaller, more manageable external reference files. Figure 12.27 illustrates the relationship of these files.

click to expand
Figure 12.27: A diagram of external reference file relationships

The combinations of external references are limited only by your imagination , but you should avoid multiple external references of the same file in one drawing.

Tip  

Because Xref files do not become part of the file they are referenced into, you must take care to keep Xref files in a location where AutoCAD can find them when the referencing file is opened. This can be a minor annoyance when you need to send files to others outside your office. To help you keep track of external references, choose File   eTransmit. See Chapter 21 for details.

Updating Blocks in External References

Several advantages are associated with using external reference files. Because the Xrefs don't become part of the drawing file's database, the referencing files remain quite small. Also, because Xref files are easily updated, work can be split up among several people in a workgroup environment or on a network. For example, in our hypothetical apartment building, one person can be editing the Common file while another works on Floor1 , and so on. The next time the composite Xref-1.dwg or Xref-2.dwg file is opened, it automatically reflects any new changes made in the external reference files.

Now let's see how to set this up:

  1. Close the Xref-2 file and then open the Common.dwg file.

  2. Update the Unit plan you edited earlier in this chapter. Click Insert Block on the Draw toolbar.

  3. In the Insert dialog box, click the Browse button and then locate and select Unit.dwg . Then click Open here, and then click OK in the Insert dialog box.

  4. At the warning message, click OK.

  5. At the Insertion point: prompt, press the Esc key.

  6. Enter RE to regenerate the drawing. You will see the new Unit plan in place of the old one (see Figure 12.28). You might also see all the dimensions and notes for each unit.

    click to expand
    Figure 12.28: The Common file with the revised Unit plan

  7. If the Notes layer is on, use the Layer & Linetype Properties dialog box or the Layer drop- down list to turn it off.

  8.  On the CD      Using the Insert Block tool on the Draw toolbar again, replace the empty room across the hall from the lobby with the utility room you created in Chapter 11 (see Figure 12.29). If you didn't create the utility room drawing, use the Utility.dwg file from the companion CD.

    click to expand
    Figure 12.29: The utility room installed

  9. Save the Common file.

  10. Now open the Xref-1 file. You will see the utility room and the typical units in their new form. Your drawing should look like the top image in Figure 12.30.

    click to expand
    Figure 12.30: The Xref-1 file with the units updated

  11. Open Xref-2. You see that the utility room and typical units are updated in this file as well (see the bottom image in Figure 12.30).

If this were a typical manually drafted project, someone would have had to make changes to both plans shown in Figure 12.30, duplicating a great deal of work.

Importing Named Elements from External References

Chapter 5 discussed how layers, blocks, line types, and text styles ”called named elements ” are imported along with a file that is inserted into another file. External reference files, on the other hand, do not import named elements. You can, however, review their names and use a special command to import the ones you want to use in the current file.

Tip  

You can set the Visretain system variable to 1 to force AutoCAD to remember layer settings of external reference files. Or turn on the Retain Changes To Xref Layers option in the Open And Save tab of the Options dialog box. You can also use the Layer State Manager in the Layer Properties Manager dialog box to save layer settings for later recall. The Layer State Manager are described in detail later in this chapter.

AutoCAD renames named elements from Xref files by giving them the prefix of the filename from which they come. For example, the Wall layer in the Floor1 file will be called Floor1WALL in the Xref-1 file; the Toilet block will be called Floor1TOILET. You cannot draw on the layer Floor1WALL, nor can you insert Floor1TOILET; but you can view external reference layers in the Layer Control dialog box, and you can view external reference blocks by using the Insert dialog box.

Next, you'll look at how AutoCAD identifies layers and blocks in external reference files, and you'll get a chance to import a layer from an Xref:

  1. With the Xref-1 file open, open the Layer Properties Manager dialog box. Notice that the names of the layers from the external reference files are all prefixed with the filename and the vertical bar () character. Exit the Layer Manager Properties dialog box.

    Tip  

    You can also open the Layer Control shortcut menu to view the layer names.

  2. Click the External Reference Bind tool on the Reference toolbar or enter Xb to open the Xbind dialog box. You see a listing of the current Xrefs. Each listing shows a plus sign to the left. This list box follows the Microsoft Windows format for expandable lists, much like the tree view in Windows Explorer.

    click to expand
  3. Click the plus sign next to the Floor1 Xref listing. The list expands to show the types of elements available to bind.

    click to expand
  4. Now click the plus sign next to the Layer listing. The list expands further to show the layers available for binding.

    click to expand
  5. Locate Floor1WALL in the listing, click it, and then click the Add button. Floor1WALL is added to the list to the right: Definitions To Bind.

  6. Click OK to bind the Floor1WALL layer.

  7. Now open the Layer & Linetype Properties dialog box.

  8. Scroll down the list and look for the Floor1WALL layer. You will not find it. In its place is a layer called Floor1$0$wall.

    Tip  

    The AutoCAD DesignCenter lets you import settings and other drawing components from any drawing, not just Xref drawings. You'll learn more about the AutoCAD DesignCenter in Chapter 21.

As you can see, when you use Xbind to import a named item, such as the Floor1WALL layer, the vertical bar () is replaced by two dollar signs surrounding a number, which is usually zero. (If for some reason the imported layer name Floor1$0$wall already exists, the zero in that name is changed to 1, as in Floor1$1$wall.) Other named items are also renamed in the same way, using the $0$ replacement for the vertical bar.

You can also use the Xbind dialog box to bind multiple layers, as well as other items from Xrefs attached to the current drawing.

Tip  

You can bind an entire Xref to a drawing, converting it to a simple block. By doing so, you have the opportunity to maintain unique layer names of the Xref being bound or to merge the Xref's similarly named layers with those of the current file. See Chapter 6 for details.

start sidebar
Nesting External References and Using Overlays

External references can be nested. For example, if the Common.dwg file created in this chapter used the Unit.dwg file as an external reference rather than an inserted block, you would still get the same result in the Xref-1.dwg file. That is, you would see the entire floor plan, including the unit plans, when you open Xref-1.dwg . In this situation, Unit.dwg is nested in the Common.dwg file, which is in turn external referenced in the Xref-1.dwg file.

Though nested Xrefs can be helpful, take care in using external references in this way. For example, you might create an external reference by using the Common.dwg file in the Floor1.dwg file as a means of referencing walls and other features of the Common.dwg file. You might also reference the Common.dwg file into the Floor2.dwg file for the same reason. After you do this, however, you will have three versions of the Common plan in the Xref-1.dwg file, because each Xref now has Common.dwg attached to it. And because Auto- CAD would dutifully load Common.dwg three times, Xref-1.dwg would occupy substantial computer memory, slowing your computer down when you edit the Xref-1.dwg file.

To avoid this problem, use the Overlay option in the External Reference dialog box. An overlayed external reference cannot be nested. For example, if you use the Overlay option when inserting the Common.dwg file into the Floor1.dwg and Floor2.dwg files, the nested Common.dwg files are ignored when you open the Xref-1.dwg file, thereby eliminating the redundant occurrence of Common.dwg . In another example, if you use the Overlay option to import the Unit.dwg file into the Common.dwg file and then attach the Common.dwg into Xref-1.dwg as an Xref, you do not see the Unit plan in Xref-1.dwg . The nested Unit.dwg drawing is ignored.

end sidebar
 

Controlling the Xref Search Path

One problem AutoCAD users have encountered in the past is a lost or broken link to an Xref. This occurs when an Xref is moved from its original location or when you receive a set of drawings that includes Xrefs. The Xref links are broken because AutoCAD doesn't know where to look. AutoCAD 2005 gives you better control over how AutoCAD looks for Xref files.

When you insert an Xref, the External Reference dialog box opens, offering you options for insertion point, scale, and rotation. This dialog box also offers the Path Type option, which enables you to select a method for locating Xrefs. You have three path type options to choose from:

Full Path     Lets you specify the exact filename and path for an Xref, including disk drive or network location. Use this option when you want AutoCAD to look in a specific location for the Xref.

Relative Path     Lets you specify a file location relative to the location of the current or host drawing. For example, if the host drawing is located in a folder called C:\mycadfiles and the Xrefs are located in a folder called C:\mycadfiles\xrefs , you can specify .\xrefs for the location of the Xref file. This option is useful when you know you will maintain the folder structure of the host and Xref files when moving or exchanging these files. Note that since this is a relative path, this option is valid only for files that reside on the same local hard disk.

No Path     Perhaps the most flexible option, this tells AutoCAD to use its own search criteria to find Xrefs. When No Path is selected, AutoCAD first looks in the same folder of the host drawing; then it looks in the project search path that is defined in the Files tab of the Options dialog box. (See Appendix A for more on the Options dialog box.) Last, AutoCAD looks in the Support search path, also defined in the Files tab of the Options dialog box. If you plan to send your files to a client or a consultant, you might want to use this option.




Mastering AutoCAD 2005 and AutoCAD LT 2005
Mastering AutoCAD 2005 and AutoCAD LT 2005
ISBN: 0782143407
EAN: 2147483647
Year: 2004
Pages: 261
Authors: George Omura

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net