Managing Xrefs

The advantage of using xrefs is that they provide the capability to create composite drawings that have relatively small file sizes and are easily updated. Unfortunately, on large projects involving multiple disciplines, keeping track of xref drawings can be difficult. Proper xref management is critical to ensure that composite drawings can find the latest versions of xrefs on standalone stations or over networks. Features available in AutoCAD can make managing xrefs easier.

The Xref Manager

The Xref Manager makes the task of managing xrefs easier. The dialog box’s diagrams and intuitive button commands are great visual aids, as is its display of such pertinent data as the xref’s name and path, current load status, whether the xref is attached or overlayed, and the xref’s file size and last modification date.

Displaying Xrefs with List View Versus Tree View

When the Tree View feature is selected, it displays any nested xrefs that may exist and a diagram of the hierarchy of xrefs. This feature makes it easy to see which xrefs have been attached and how they relate to one another.

Note

The Tree View feature instantly displays a visual diagram of xrefs and any nested xrefs. More importantly, the nested xrefs are actually shown attached to their parent xref.


The following exercise demonstrates the Tree View feature.

Exercise 14.7 Accessing Tree View Display

1.
Open the 14DWG06a.DWG drawing file on the accompanying CD.

The drawing contains two xrefs, each of which also contains two xrefs. When the drawing opens, the hierarchy of the xrefs and nested xrefs appears onscreen, as shown in Figure 14.14.

Figure 14.14. The hierarchy of the xrefs and nested xrefs.


2.
From the Insert menu, choose Xref Manager. The Xref Manager dialog box opens. Initially, it opens in List View mode. Two buttons appear in the upper-left corner of the dialog box. The one on the left, the List View button, is grayed. The one on the right is the Tree View button.

Tip

In List View mode, you can sort the xrefs in the display box in ascending or descending order. This is true for any of the displayed data. To sort, choose a column’s title bar. AutoCAD sorts the data in ascending order based on the selected column. Select the column’s bar again to sort the data in descending order.

3.
Click on the Tree View button.

The text box below the buttons changes and now displays the hierarchy of the xrefs, as shown in Figure 14.15. From this display, you can easily manage the xrefs. For example, you can unload a nested xref that is no longer needed.

Figure 14.15. The Xref Manager in Tree View mode.


4.
In the Xref Manager, choose XREF1A. Several buttons in the Xref Manager become active, and the xref’s path and drawing filename appear, as shown in Figure 14.16.

Figure 14.16. The Xref Manager’s buttons activate when XREF1A is selected.


5.
Click the Unload button, then click OK.

AutoCAD unloads the nested xref XREF1A and redisplays the drawing, as shown in Figure 14.17.

Figure 14.17. The Xref Tree View illustrating the condition after XREF1A is unloaded.


6.
Close the drawing and do not save changes.

Tip

The best way to eliminate display of unwanted nested xrefs is to overlay an xref, but you can achieve the same effect—reducing regen time—by unloading an unwanted nested xref.


Note

In previous releases, xref-dependent layer names in the current drawing could be only 31 characters long. Because AutoCAD would add the xref’s drawing name to its layer names, if the layer’s names were long, AutoCAD would abort loading the xref. With AutoCAD 2000 and newer releases, layer names can be 255 characters long. More importantly, the xref’s drawing name does not count toward the 255-character limit.


Caution

It is not recommended that you use long layer names if the data is to be used by R14 or earlier. Even though AutoCAD now supports long names, these names cannot be read properly by older versions.


Explicit and Implicit Xref Paths

An xref’s path can be defined explicitly or implicitly. Explicit paths include the entire directory path and end with the xref’s filename. Implicit paths contain only a partial subdirectory path and the xref’s filename. AutoCAD saves both explicit and implicit path data with the drawing.

There is an advantage to saving the xref paths implicitly. If the drawing is opened on another workstation, AutoCAD will successfully resolve the xref as long as the implicit path hierarchy exists at the new workstation. In contrast, if the path is explicitly defined, AutoCAD will probably not find the xref file.

For example, suppose that a drawing lies in the following directory:

G:WORKJOB-ONE14DWG07A.DWG 

Also, suppose that this drawing has an xref attached that lies in the following directory:

G:WORKJOB-ONEXREFS14DWG07B.DWG 

Both of these xref paths are explicitly defined. Notice that the entire drawing’s path is shown, including its root directory. This means that while you edit the 14DWG07a.DWG file at the workstation on which it resides, AutoCAD can successfully resolve the xref because it will find it in the explicit path. In other words, the xref file is still located on the G drive, and in the subdirectory shown.

But what happens if the drawing and xref are moved to another workstation? Suppose that the files are moved to the following hard drive and directory:

C:Program FilesAutoCAD 2002SAMPLE14DWG07A.DWG 
C:Program FilesAutoCAD 2002SAMPLEXREFS14DWG07B.DWG 

The 14DWG07a.DWG file can still be opened in AutoCAD on the new workstation after it is located, but if the xref’s path is not in the explicitly defined path, AutoCAD issues the following error message:

Resolve Xref XREF1: D:WORKJOB-ONEXREFS14DWG07B.dwg 
Can't find D:WORKJOB-ONEXREFS14DWG07B.dwg 

AutoCAD indicates that it can’t find the xref indicated by the explicitly defined path. Consequently, AutoCAD opens the 14DWG07a.DWG drawing without resolving the attachment of the xref (which it could not find). To avoid the problem of unresolved xrefs, you can redefine the xref’s path implicitly, as described in the following exercise.

Exercise 14.8 Implicitly Defining an Xref’s Path

1.
Create a new directory folder called XREFS in the AutoCAD 2002SAMPLE subdirectory.

2.
Copy the 14DWG07a.DWG drawing file on the accompanying CD into the AutoCAD 2002SAMPLE subdirectory.

3.
Copy the 14DWG07b.DWG drawing file on the accompanying CD into the AutoCAD 2002SAMPLEXREFS subdirectory.

4.
Open the 14DWG07a.DWG drawing file from the AutoCAD 2002SAMPLE directory.

The drawing opens, and then issues the warning that it can’t find the xref. (By pressing F2, you can toggle on the AutoCAD Text Window and view the information.)

5.
From the Insert pull-down menu, choose Xref Manager. The Xref Manager appears, as shown in Figure 14.18. Notice that the XREF1 drawing file’s status is Not Found. Also notice that AutoCAD looked for the xref in the explicitly defined path location listed in the Saved Path column.

Figure 14.18. AutoCAD cannot find the xref using its explicitly defined path.


6.
Select the reference name XREF1. The Xref Found At text box becomes active.

7.
Click the Browse button. The Select New Path dialog box opens.

8.
Open the 14DWG07b.DWG drawing file from the AutoCAD 2002SAMPLEXREFS directory.

The display returns to the Xref Manager. The xref’s path is now displayed in the Xref Found At text box, as shown in Figure 14.19. Notice that the XREF1 status is still Not Found.

Figure 14.19. The XREF1 file’s location is displayed in the Xref Found At text box.


9.
Click the Reload button. The XREF1 status changes to Reload. Next, you redefine the xref’s path implicitly.

10.
In the Xref Found At text box, highlight the beginning portion of the path, from the root directory listing up to the Xrefs folder, as shown in Figure 14.20.

Figure 14.20. The beginning portion of the XREF1 file’s path is selected, then deleted.


11.
Press the Delete key. AutoCAD deletes the highlighted portion of the path.

12.
Press Enter to save the modified path as the implicit path. AutoCAD redefines the path as implicit, and displays it in the Saved Path column, as shown in Figure 14.21.

Figure 14.21. The XREF1 file’s path is redefined as implicit.


13.
Click OK.

14.
You may close the drawing without saving your changes.

AutoCAD resolves the xref, and loads it into the current drawing. AutoCAD was able to resolve XREF1 using the implicit path because the 14DWG07a.DWG and the XREFS folder were in the same folder. In the exercise, both were in the SAMPLE folder.

With the xref’s path now implicitly defined and saved with the drawing, if the 14DWG07a.DWG file is moved to a different folder, and the 14DWG07b.DWG is moved and placed in a subfolder named XREFS, AutoCAD will resolve the xref when the 14DWG07a.DWG is opened. This is true as long as the 14DWG07a.DWG and the XREFS subfolder are placed in the same folder.

By using the preceding technique to define xref paths implicitly, you can avoid the problem of unresolved xrefs when transferring drawing files from one workstation to another.

Tip

You can use the PROJECTNAME system variable to assign xref search paths to your workstation. By assigning the search paths to a project name, you can resolve xrefs although their paths are defined explicitly or implicitly. For more information, see the section “Using PROJECTNAME to Specify Xref Search Paths.”


Circular Xrefs

Circular xrefs occur when two drawings are inserted as xrefs into each other. For example, suppose you have drawing A and drawing B. A circular xref occurs when drawing A is attached as an xref into drawing B, and then drawing B is attached as an xref into drawing A.

In releases prior to Release 14, AutoCAD would issue a warning about the circular reference and abort the XREF command. Now, AutoCAD loads the xref up to the point where the circularity exists. It stops at the point of circularity because a drawing cannot load itself as an xref.

Caution

A circularity anomaly introduced into AutoCAD 2000 can cause problems in certain filenaming techniques. If a drawing has a period in its name other than the one separating the name and dwg suffix (filename.dwg), attaching xrefs will be halted if they share the same name up to the first period. For example:A2.10.dwg could not attach xref A2.10-2.dwg because AutoCAD 2000 would assume circularity at the A2. and halt attachment. With AutoCAD 2002 this problem has been resolved but it is still a good idea to avoid that naming practice for downward compatibility.


Using PROJECTNAME to Specify Xref Search Paths

The PROJECTNAME system variable allows you to assign a project name to a drawing. The project name can also be declared in AutoCAD on each workstation, and assigned search paths for xrefs. By assigning xref search paths to a project name on a workstation, you can load a drawing that has the same project name assigned to its PROJECTNAME variable, and thereby use the workstation’s search paths to resolve xrefs.

AutoCAD saves the project name in the workstation’s system Registry, and includes the search paths assigned to the project name. AutoCAD also saves the project name to the current drawing, but does not save the search paths in the drawing. What this means is that a particular project name can be assigned to a drawing that has xrefs attached, and each CAD technician can assign different xref paths to the same project name on his workstation. When the drawing is opened, no matter what xref paths are defined in the drawing, each workstation will resolve the drawing’s xrefs. This feature avoids the problem of managing xref paths, either explicitly or implicitly, in order to resolve xrefs.

This feature also enables you to create multiple project names on your workstation, each of which can contain a specific set of xref search paths. This means you can have many project names defined for your workstation, each with its own set of xref search paths.

Note

When AutoCAD searches for xrefs, it searches first for xrefs in the current drawing’s folder, then it searches using explicitly and implicitly defined paths. Next, it searches using the current project name search paths, and finally, it uses AutoCAD’s default search paths.


The following exercise demonstrates how to add, remove, and modify project name search paths.

Exercise 14.9 Adding, Removing, and Modifying Project Name Search Paths

1.
Start a new drawing from scratch.

2.
From the Tools menu, choose Options, then select the Files tab.

3.
Double-click on the Project Files Search Path title. A subdirectory appears beneath the title. If you have not yet defined any project names, the only subdirectory listed is Empty.

4.
To create a project name, choose the Project Files Search Path folder so it is highlighted, then click the Add button. AutoCAD creates a new folder with the title Project1. This name is ready to be edited.

5.
Type a new project name, Path One , and press Enter. AutoCAD creates the new project name, as shown in Figure 14.22.

Figure 14.22. The new Path One project name is created.


6.
With the Path One project name still highlighted, click the Add button. AutoCAD creates a blank search path directory. You can either type in a search path, or browse for one.

7.
Click the Browse button. The Browse for Folder dialog box appears.

8.
Browse to the AutoCAD 2002SAMPLE subdirectory, open the Sample folder, and click OK. AutoCAD returns to the Options dialog box and displays the selected path, as shown in Figure 14.23.

Figure 14.23. The xref path is assigned to the Path One project name.


9.
To save the project name and its search paths, click the Apply button, then click OK.

10.
You may close the drawing without saving your changes.

Note

It is recommended that you compare the speed of the loading xrefs via the PROJECTNAME variable and the Support File Search path from the Files tab in the Options dialog box. Some conditions may result in slower load times either way.


You can add as many paths as necessary to each project name, and you can create as many project names as you need.

When a project name is highlighted as shown in Figure 14.24, by clicking the Set Current button, you set the current drawing’s PROJECTNAME variable to the highlighted project name. The highlighted project name’s search paths then become the current paths AutoCAD uses to find xrefs.

Figure 14.24. Highlighting the project name and clicking the Set Current button sets the drawing’s PROJECTNAME system variable.


Xref Layers, Colors, Linetypes, and Lineweights

When an xref is attached to the current drawing, AutoCAD duplicates the xref’s layer names in the current drawing. AutoCAD prefixes the layer names with the xref’s name, followed by the pipe symbol (|). Then, AutoCAD assigns these new layers the same colors, linetypes, and lineweights as those in the xref drawing.

The only time AutoCAD does not assign the same colors, linetypes, and lineweights as those in the xref is when the objects are created on layer 0 in the xref. Just like blocks, these xref objects have special properties. If their color, linetype, and lineweight properties are set to BYLAYER, they assume the color, linetype, and lineweight of the layer on which the xref is inserted. If their color, linetype, and lineweight properties are set to BYBLOCK, they assume the color, linetype, and lineweight properties that are currently defined for the creation of new objects in the current drawing, as displayed in the Object Properties toolbar. Finally, if their color, linetype, and lineweight properties are explicitly defined in the xref, those properties remain fixed.

Except for colors, linetypes, and lineweights assigned explicitly in the xref, you can change the color, linetype, and lineweight of an xref’s layers from the Layer Manager. These changes appear in the current drawing and do not affect the color, linetype, and lineweight in the original xref file. After you exit the drawing, however, any changes to the color, linetype, and lineweight properties are lost. When the drawing is opened again, the colors, linetypes, and lineweights assume the settings in the original xref.

Tip

To save changes you make to an xref layer’s color, linetype, and lineweight properties with the current drawing, set the system variable VISRETAIN to 1. When you open the drawing, the changes you made to the xref layer’s color, linetype, and lineweight properties in a previous editing session are restored.


The In-Place Reference Editing Feature

AutoCAD 2000 introduced a powerful feature called In-Place Reference Editing. This feature allows you to edit objects in an inserted xref file from the current drawing, and save the changes back to the xref file. You can use In-Place Reference Editing to quickly edit an inserted xref without the need to open the xref file.

In-Place Reference Editing is intended to allow you to make modest edits to an xref file from the current drawing. Although you can make significant changes to the xref file from the current drawing, it is more efficient to open the xref file to directly perform significant edits. Using In-Place Reference Editing to make significant changes to xref files can temporarily increase the current drawing’s file size, thereby increasing regen times and slowing productivity. Therefore, use this new feature to quickly make modest edits to xrefs.

After you select the xref, you specify the objects you want to edit. AutoCAD temporarily brings the selected objects into the current drawing for modification and makes them part of a working set. After the objects are modified, the working set of objects is saved back to the xref file.

The following exercise demonstrates how to use In-Place Reference Editing.

Exercise 14.10 Editing an Xref with In-Place Reference Editing

1.
Copy the files 14DWG08a.DWG and 14DWG08b.DWG from the accompanying CD to the AutoCAD 2002SAMPLE subdirectory. Before you continue with the exercise, you must clear the read-only attribute to edit and save changes back to the files.

2.
From Windows Explorer, select the 14DWG08a.DWG and 14DWG08b.DWG drawing files in the AutoCAD 2002SAMPLE directory, then right-click to display the shortcut menu.

3.
From the shortcut menu, choose Properties. The Properties dialog box appears.

4.
From the Properties dialog box, clear the Read-Only check box, then click OK. The read-only attribute is cleared from the files.

Next, you start a new drawing and insert the 14DWG08a.DWG file as an xref.

5.
From AutoCAD, start a new drawing from scratch.

6.
From the File menu, choose Save. AutoCAD displays the Save Drawing As dialog box.

7.
Name the file MYFILE, and save it to the AutoCAD 2002SAMPLE subdirectory.

8.
From the Insert menu, choose External Reference. The Select Reference File dialog box appears.

9.
Open the 14DWG08a.DWG drawing file from the AutoCAD 2002/SAMPLE directory. AutoCAD displays the External Reference dialog box.

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

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

12.
Click OK. AutoCAD attaches the drawing and displays two text objects inside a rectangle object.

The upper text object is located in the 14DWG08a.DWG xref file. The lower text object is located in the 14DWG08b.DWG file, and is a nested xref.

13.
Zoom in close to the objects to view them better.

14.
From the Modify menu, choose In-Place Xref and Block Edit, Edit Reference. AutoCAD prompts you to select a reference.

15.
Select the lower text object. AutoCAD displays the Reference Edit dialog box, which shows the two xref filenames.

Because the 14DWG08b.DWG file is nested within the 14DWG08a.DWG file, and you selected the text object that’s in the nested xref, AutoCAD displays both names. At this point, you select the file whose objects you wish to edit.

16.
In the Reference Name area, choose the 14DWG08b.DWG file. AutoCAD highlights the selected xref name, as shown in Figure 14.25.

Figure 14.25. The Reference Edit dialog box allows you to select the xref to edit.


17.
Be sure the Enable Unique Layer and Symbol Names check box is selected, and that the Display Attribute Definitions for Editing check box is cleared.

Note

AutoCAD assigns temporary layer names to the current drawing when the Enable Unique Layer and Symbol Names check box is selected.

18.
Click OK. AutoCAD prompts you to select the nested objects.

19.
Choose the lower text object, then press Enter to end object selection. AutoCAD visually moves the selected object into the current drawing, and displays the Refedit toolbar.

Notice that AutoCAD fades objects that are not being edited, as shown in Figure 14.26. This makes it easier to identify the objects you selected for editing.

Figure 14.26. AutoCAD fades objects that are not being edited.


Note

You can adjust the fading intensity from the Display tab found on the Options dialog box, which is displayed from the Tools menu by choosing Options.

Next, you edit the lower text object, and save the changes back to its xref.

20.
Select the lower text object. AutoCAD highlights the object.

21.
Right-click to display the shortcut menu, then choose Text Edit. AutoCAD displays the Text Edit dialog box.

22.
In the text box, replace the highlighted text with the word MODIFIED .

23.
Click OK, then press Enter to end object selection. AutoCAD modifies the text object.

24.
Click the Save Back Changes to Reference button, as shown in Figure 14.27. AutoCAD issues a warning noting that all reference edits will be saved.

Figure 14.27. The edits to xref objects are saved back to their original xref file.


25.
Click OK. AutoCAD saves the changes back to the xref file, then exits the reference edit mode.

26.
You may close the drawing without saving your changes.

At this point, if you open the 14DWG08b.DWG drawing from the AutoCAD 2002 SAMPLE directory, you will notice that the text object is changed to MODIFIED.

AutoCAD allows you to add or remove additional objects to the working set. This is done by clicking the Add or Remove Objects from the Working Set buttons, located on the Refedit toolbar. If you decide you don’t want to save edits back to the original xref, you can click the Discard Changes button.

While in the reference edit mode, if you create new objects, they are almost always added to the working set. There are some situations in which this is not true, such as when AutoCAD generates an arc object during the FILLET command.

Although AutoCAD fades objects that are not part of the working set, the objects can still be edited, so caution should be taken. For example, if the MyFile drawing contained another text object, you could edit its text string. The changes you make to it, however, would only be saved in the current drawing.

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

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