Working with External References Productively

External references, or xrefs, represent a powerful feature of AutoCAD 2002. They provide the capability to create a composite drawing using other saved drawings, even while those other drawings are being edited. In a multidisciplinary work environment, you can attach another discipline’s drawings to see the impact their design will have on your design. The drawings can be attached temporarily, or inserted permanently as a block. You can permanently insert the entire xref, or just its named objects, such as text styles or dimension styles. You can attach an entire xref or just the portions you need to review. You can even define an irregularly shaped polygon as the clipping boundary for the portion of the xref you want to attach. By attaching small clipped portions of an xref, you can dramatically reduce regen times.

Additionally, AutoCAD 2000 introduced a feature called In-Place Reference Editing, which allows you to edit an attached xref from the current drawing, and save the changes back to the original drawing file. These versatile features make AutoCAD’s xrefs a very powerful tool.

Using Xrefs Versus Blocks

External references have behavior that is similar to blocks. They can be inserted or “xreffed” into a drawing and used to display a group of objects as a single object. They can be copied multiple times, and all the insertions of a block or an xref can be changed by editing the original reference file. The only real difference between the two is that blocks are inserted permanently into the current drawing, becoming part of the drawing, whereas xrefs exist externally as independent files that are only attached to the current drawing.

So, if xrefs behave like blocks, then when should you use xrefs rather than blocks? One situation in which you should use xrefs is when the objects in external drawings that you need to view are undergoing change. When edits are made to an externally referenced file, you can reload the xref to update it to reflect the most recent condition of the xref. Additionally, AutoCAD automatically loads the latest version of an xreffed drawing when you open your drawing. This is not true with blocks.

Another reason to use xrefs instead of blocks is when the xreffed drawing is large. Not only can you keep the current drawing’s file size low by attaching large drawings as xrefs, you can also instruct AutoCAD to only load a small portion of an xref instead of the entire xreffed drawing. This reduces the number of objects in the current drawing and therefore reduces file size and regen times.

Lastly, a great benefit of xrefs is the ability to “insert” them into multiple drawing files. An example of this is a grid drawing for a building being attached to multiple floor plans. If the grid changes, all levels instantly reference the updated file.

Inserting an Xref: Attach Versus Overlay

You can link an xref to the current drawing in two different ways. You can either attach it or overlay it. Both methods enable you to turn layers on and off, or to freeze and thaw layers. Both enable you to change the color, linetypes, and lineweights of layers of xreffed drawings. Both methods are virtually identical, with one exception: Attached xrefs appear when nested in other xreffed drawings, whereas overlays do not.

The following exercise demonstrates the difference between attaching and overlaying an xref.

Exercise 14.3 Attaching Versus Overlaying an Xref

1.
Open the 14DWG03c.DWG drawing file on the accompanying CD to display a Tentative Tract Map consisting of right-of-way lines, property lines, street centerlines, and proposed building pads.

Next, you insert two xrefs: one you attach, and the other you overlay.

2.
From the Insert menu, choose Xref Manager, and then click the Attach button. The Select Reference File dialog box opens.

3.
From the Select Reference File dialog box, open the 14DWG03a.DWG drawing file. AutoCAD displays the External Reference dialog box.

4.
In the External Reference dialog box, under Reference Type, choose Overlay.

5.
In the Insertion Point area, Scale area, and Rotation area, clear any checked Specify On-Screen check boxes, as shown in Figure 14.7.

Figure 14.7. The Overlay option is selected in the External Reference dialog box.


6.
Click OK. AutoCAD overlays the drawing and displays its existing contours.

7.
From the Insert menu, choose External Reference. The Select Reference File dialog box opens.

8.
From the Select Reference File dialog box, open the 14DWG03b.DWG drawing file. AutoCAD displays the External Reference dialog box.

9.
In the External Reference dialog box, under Reference Type, choose Attachment.

10.
In the Insertion Point area, Scale area, and Rotation area, clear any checked Specify On-Screen check boxes.

11.
Click OK. AutoCAD attaches the drawing and displays its existing trees, as shown in Figure 14.8.

Figure 14.8. One xref is attached, and the other is overlaid in the current drawing.


12.
Save the file in the AutoCAD 2002SAMPLE directory.

13.
Close the 14DWG03c.DWG drawing file.

14.
Open the 14DWG03d.DWG drawing file on the accompanying CD. AutoCAD displays the drawing, which displays the building plans.

Next, you insert the Tentative Tract Map drawing, with its two xrefs.

15.
From the Insert menu, choose External Reference. The Select Reference File dialog box opens.

16.
From the Select Reference File dialog box, open the 14DWG03c.DWG drawing file from the AutoCAD 2002SAMPLE directory. AutoCAD displays the External Reference dialog box.

17.
In the External Reference dialog box, under Reference Type, choose Attachment.

18.
In the Insertion Point area, Scale area, and Rotation area, clear any checked Specify On-Screen check boxes.

19.
Click OK.

20.
You may now exit the drawing without saving your changes.

AutoCAD attaches the drawing, as shown in Figure 14.9. It’s important to realize that the existing Contours and the existing Trees drawings are already referenced in the Tentative Tract Map drawing, and are therefore nested xrefs. Note that the Trees xref appears, but that the Contours xref does not. This occurs because the Contours drawing was overlayed, whereas the Trees drawing was attached to the Tentative Tract Map drawing.

Figure 14.9. The nested trees xref appears, but the nested contours xref does not.


By using the attach and overlay features as shown in the preceding exercise, you can more easily manage the visibility of xreffed drawings.

Note

If the xref file you attach or overlay has objects organized with the DRAWORDER command, the objects will not appear in their proper drawing order. This is because the DRAWORDER command only works on objects in the current drawing, and not on objects in xrefs.


Tip

You can force xref objects to appear in their desired drawing order by opening the xref and using the DRAWORDER command to arrange objects as desired, and then using the WBLOCK command to write the entire xref out as a new drawing. AutoCAD retains the desired drawing order when the xref is re-created using the WBLOCK command.


Unloading and Reloading Xrefs

After you have attached or overlayed xrefs, the xrefs can be unloaded and then reloaded as desired. This capability allows you to temporarily remove xrefs from a drawing so AutoCAD does not spend time calculating the positions of xref objects during regens. When you unload an xref, AutoCAD removes the xref from the current drawing, but leaves its path. To display the xref in the drawing again, you can reload the xref.

In addition to reloading xrefs that have been unloaded, you can also reload xrefs that are already loaded. This is useful when you know that an xreffed drawing is being edited, and you want to refresh the drawing’s display to see any new changes that have taken place since you originally loaded the xref.

Tip

Loaded xrefs can significantly increase regen times. If you are editing a drawing and do not need to see a loaded xref, use the UNLOAD command to remove it temporarily from the drawing. Also selecting xref objects when editing other objects can be very bothersome. If needed you can unload the xref to clear up the area on which you are working. This will increase your productivity.


Permanently Inserting an Xref: Bind Versus Xbind

Occasionally, you may need to make an xref drawing a permanent part of the current drawing. When archiving files for permanent storage, for example, or when submitting a file to another technician, you may find it useful to make xrefs a part of the drawing to which they are attached, thereby combining all the drawings into a single dwg file. By combining the xrefs into a single drawing, you ensure that all the drawing data exists in a single file. You can make an xref a permanent part of another drawing by binding it to the drawing, which inserts the entire xref into the drawing as a block.

When you choose to bind an xref to the current drawing, AutoCAD prompts you to select the type of bind to use: Bind or Insert. When the Bind option is selected, AutoCAD inserts the xref into the current drawing, and prefixes all named objects with the xref’s drawing name. Therefore, named objects such as layers, blocks, and text styles are prefixed by the xref’s drawing name, and then inserted into the current drawing. However, if you choose the Insert option, AutoCAD inserts the drawing as a normal block, and does not prefix named objects with the xref’s drawing name. Consequently, any duplicate named objects in the xref are ignored, and the named objects in the current drawing hold precedence.

This means, for example, that if a block in the xref has the same name as a block in the current drawing, the block in the current drawing will take precedence and will be substituted in place of all same name block insertions in the xref. Although this feature eliminates the redundancy of duplicate layer names, it may give unexpected results if you are not aware of duplicate named objects.

Note

When you attach an xref to a drawing, the xref’s drawing name prefixes its layer names, which are separated by the pipe (|) symbol. When you bind the xref to the drawing, the pipe symbol is replaced by $0$, where the zero represents the first instance of a bound xref. If another xref with the same name as the first is also bound to the drawing, the zero increments to one, and appears as $1$. This feature avoids potential problems when binding xrefs from different departments or companies that may coincidentally use the same xref name.


While binding an xref into the current drawing is useful under certain conditions, there are occasions when it is more useful to only bind an xref’s named objects. You can accomplish this with the XBIND command.

Suppose, for example, that you have attached an xref to the current drawing. You intend to leave the xref attached for a short time only, and then detach it. After the xref is attached, you notice that some of its text objects are using a text style that you want to use in the current drawing. You can easily insert the text style in the current drawing with the XBIND command.

The following exercise demonstrates how to use XBIND to attach an xref-dependent text style.

Exercise 14.4 Xbinding a Dependent Text Style

1.
Start a new drawing from scratch. Next, attach an xref drawing that contains the Simplex text style.

2.
From the Insert menu, choose External Reference. The Select Reference File dialog box opens.

3.
From the Select Reference File dialog box, open the 14DWG04.DWG drawing file on the accompanying CD.

4.
In the External Reference dialog box, under Reference Type, choose Attachment.

5.
In the Insertion Point area, Scale area, and Rotation area, clear any checked Specify On-Screen check boxes.

6.
Click OK. AutoCAD attaches the xref, and the text appears in the current drawing.

Next, use XBIND to insert the dependent text style.

7.
From the Modify menu, choose Object, External, Reference, Bind. The Xbind dialog box appears.

8.
Double-click on the highlighted xref name.

AutoCAD displays the five named object headings in the xreffed drawing. Notice that a small box containing a plus (+) sign is next to two of the named object headings.

9.
Click on the box with the plus sign next to the Textstyle heading. AutoCAD displays two dependent text style objects.

10.
Choose the 14DWG04|SIMPLEX text style object. The selected text style symbol is highlighted.

11.
Click the Add button. The highlighted text style object appears in the Definitions to Bind text box, as shown in Figure 14.10.

Figure 14.10. The XBIND command allows you to insert named objects such as text styles from xreffed drawings into the current drawing.


12.
Click OK. AutoCAD binds the text style object to the current drawing.

13.
From the Format menu, choose Text Style. The Text Style dialog box opens.

14.
Under Style Name, open the drop-down list and look at the available style names.

Notice that the text style 14DWG04$0$SIMPLEX is listed as a selection, as shown in Figure 14.11. AutoCAD always prefixes bound named objects with their original drawing’s filename.

Figure 14.11. The text style is inserted from the xref file.


15.
You may exit the Style command and quit the drawing without saving changes.

Note

XBIND does not permit you to load view objects from the attached drawing.

By using AutoCAD’s Bind and Xbind features, you can permanently insert the entire xref, or just insert specific named objects, such as text styles and linetypes.


Clipping Boundaries

The XCLIP command allows you to use rectangles and irregularly shaped polygons to define clipping boundaries for xrefs. The polygons can be created on-the-fly or by selecting an existing 2D polyline. After the clipping boundary has been chosen, AutoCAD removes from display any portion of the xref that lies outside the clipping boundary.

The following exercise demonstrates how to use the Select Polyline feature of the XCLIP command to define the xref clipping boundaries with an irregular polygon.

Exercise 14.5 Using the Select Polyline Feature of the XCLIP Command

1.
Open the 14DWG05b.DWG drawing file on the accompanying CD. The 14DWG05a.DWG drawing file is already attached as an xref.

2.
From the Modify menu, choose Clip, Xref.

3.
Select the xref and press Enter.

4.
Press Enter again to accept the default for a new boundary.

5.
Type S to choose Select Polyline.

6.
Select the large, green polyline.

AutoCAD determines the limits of the clipping boundary and redisplays only the portion of the xref that is inside the clipping boundary, as shown in Figure 14.12.

Figure 14.12. The xref is clipped using the polyline.


7.
Keep the drawing open for an exercise that follows.

The preceding exercise demonstrated how to use the Select Polyline feature of the XCLIP command. In some cases, however, defining only one clipping boundary for the xref may not be enough. The following section leads you through the necessary steps to create multiple boundaries.

Creating Multiple Clipping Boundaries

One limitation of the XCLIP feature is that an xref can have only one clipping boundary. But what if you want to clip the same xref with more than one polygon? How do you create multiple clipping boundaries? One answer is to insert the same xref more than once.

The following exercise demonstrates how to use two separate polygons to create two clipping boundaries for the same xref.

Exercise 14.6 Creating Multiple Clipping Boundaries for the Same Xref

1.
Continue with the 14DWG05b.DWG drawing from the previous exercise.

2.
Choose the Copy command from the Modify pull-down menu and select the xref 14DWG05a that has been clipped.

3.
At the Specify base point or displacement, or [Multiple]: prompt, type 0,0 then press Enter. Then type @ and press Enter again.

4.
AutoCAD “attaches” the xref again, creating a duplicate xref on top of the existing clipped xref.

Next, use the Select Polyline feature of the XCLIP command to clip the xref by selecting the small rectangular polygon.

5.
From the Modify menu, choose Clip, Xref.

6.
Select one of the xrefs in the large area and then press Enter.

Because the first xref has been clipped, it can be selected only from inside the large polygon.

7.
Press Enter to accept the new boundary default. At the Delete Old Boundary(s)? prompt answer yes.

8.
Type S to choose Select Polyline.

9.
Select the small, green rectangle.

10.
You may now close the drawing without saving.

AutoCAD determines the limits of the clipping boundary and then redisplays only the portion of the copied xref that is inside the small rectangular clipping boundary, as shown in Figure 14.13.

Figure 14.13. The same xref is inserted twice, and each xref is clipped separately.


Tip

As an alternate method of inserting a copy of an xref, you could use the RENAME command to rename the original xref insertion, then insert the xref again, and xclip the new insertion. This method would then create two uniquely named xrefs, which is useful for modifying different xref layer properties.


Tip

The xref can be renamed from the Xref Manager dialog box. Simply highlight the xref to be renamed, then press F2. After you change the name, press Enter.


Tip

When creating similar sheets each with a different xref, it can save you time to set up the first sheet by attaching, scaling, and placing the xref drawing, followed by saving. Then from within the saved drawing, Save As to your next drawing and modify the path for the next xref. This effectively swaps one xref for another but preserves placement and scale settings. Once swapped, rename the xref to match that of the new xref drawing. Continue for all sheets as needed. This technique is a big timesaver!


Demand Loading

Demand Loading works in conjunction with layer and spatial indexes, and reduces regen times. By enabling Demand Loading when using xrefs, AutoCAD loads only specific objects from the xref into the current drawing. By loading only a portion of the xref’s objects, the number of objects in the current editing session is minimized, thereby increasing AutoCAD’s performance.

Demand Loading is controlled by a system variable named XLOADCTL, which controls how AutoCAD uses layer and spatial indexes that may exist in xrefs. By enabling Demand Loading (setting XLOADCTL to either 1 or 2), AutoCAD loads only objects on layers that are thawed when the xref has layer indexes, and loads only objects within the clipping boundary when the xref has spatial indexes. Table 14.1 shows the variable’s three settings and their effects.

Table 14.1. The Demand Loading Settings
Setting Effect
0—Disabled Turns off Demand Loading.
1—Enabled Turns on Demand Loading, and prevents other users from editing the drawing file while it is xreffed.
2—Enabled with Copy Turns on Demand Loading, and creates a copy of the drawing that it xrefs. This allows other users to edit the xref’s original drawing.

In most networked environments, a setting of 0 is preferred. With today’s newer systems, the timesavings provided by setting 1 is negated by the problems with xreffing drawings that others have opened or xreffed. Setting 2 can be useful because of its timesavings, but can result in increased hard disk activity by the duplication of the dwg file.

Note

The XLOADCTL system variable’s settings can be controlled through the Options dialog box, from the Open and Save tab. For more information, refer to Chapter 3, “Controlling the AutoCAD 2002 Drawing Environment,” in the section “External References.”


Layer and Spatial Indexes

In the previous section, you learned about the system variable that controls Demand Loading. AutoCAD has another system variable, called INDEXCTL, that controls layer and spatial indexing, and works in conjunction with the Demand Loading system variable, XLOADCTL.

When layer indexing is enabled, AutoCAD does not load xref objects residing on layers that are frozen in the external reference drawing. When spatial indexing is enabled, AutoCAD will not load xref objects that reside outside the clip boundary. In both cases, fewer objects are brought into the current drawing, and regen times are reduced.

By enabling the INDEXCTL system variable, AutoCAD’s performance can be enhanced by reducing the regen times of drawings with xrefs. Table 14.2 shows the variable’s four settings and their effects.

Table 14.2. The Layer and Spatial Index Settings
Setting Effect
0—None Both layer and spatial indexing are disabled.
1—Layer Only layer indexing is enabled.
2—Spatial Only spatial indexing is enabled.
3—Layer & Spatial Both layer and spatial indexing are enabled.

Note

Setting the INDEXCTL system variable to a value other than 0 enables layer or spatial indexing (or both). Consequently, when the drawing is saved, AutoCAD adds to it the additional layer and spatial index data, thereby increasing the drawing’s file size.


Spatial indexes work three dimensionally by defining a front and back clipping plane. The front and back clipping planes are defined via the XCLIP command’s clipdepth option. By creating a clipping boundary and specifying the clipdepth, you can greatly limit the xref objects that AutoCAD loads into the current drawing session.

Layer and spatial indexes are created in a drawing when the INDEXCTL system variable is set to the desired value and the drawing is then saved. If INDEXCTL is set to 3, for example, both layer and spatial indexes are created when the current drawing is saved. The indexes are saved with the drawing file. Consequently, if you attach the drawing as an xref to a new drawing that has Demand Loading enabled, AutoCAD uses the xref’s layer and spatial indexes to load only those objects that are on thawed layers and lie within the clipping boundary.

Note

Layer and spatial indexes are available only with Release 14 and newer drawings. Previous releases of AutoCAD do not create layer and spatial indexes when drawings are saved.


Tip

Leave the INDEXCTL system variable set to its default value of 0 to help keep the drawing’s file size minimal. Only set the variable to a value other than 0 when the file you are saving is to be used as an xref, and the layer and spatial indexes will be used by the Demand Loading feature.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.139.42