June 7, 2007

External References 101

When you attach a drawing as an xref, you link that referenced drawing to the current drawing; any changes to the referenced drawing are displayed in the current drawing when it is opened.

The program treats an xref as a type of block definition with some important differences. When you insert a drawing as a block reference, it is st
ored in the drawing and is not updated if the original drawing changes. When you attach a drawing as an xref, you link that referenced drawing to the current drawing; any changes to the referenced drawing are displayed in the current drawing when it is opened or reloaded.

A drawing can be attached as an xref to multiple drawings at the same time. Conversely, multiple drawings can be attached as external reference
s to a single drawing.

The saved path used to locate the xref can be an absolute (fully specified) path, a relative (partially specified) path, or no path.

If an xref contains any variable block attributes, the program ignores them. Note Xrefs must be model space objects. They can be attached at any scale, location, and rotation.

Notification of Attached Xrefs

An xref icon is displayed in the lower-right corner of the application window (the status bar tray) when xrefs are attached to the drawing. When one or more xrefs are not found or if any of the xrefs need reloading, an question mark is added to the Xref icon. If you click the Xref icon, the Xref Manager is displayed.









External References Dialog Box

It displays the xrefs in the drawing in a tree view or a lis
t view. You can use the F3 and F4 keys to switch between list view and tree view. Selecting any field selects the xref.

List view (F3) displays a flat listing of the attached xrefs and their associated data. You can sort the list of references by name, status, type, file date, file size, or the saved path and file name. See image below.



Tree view (F4) displays a hierarchical representation of the xrefs, displaying the relationships between xref definitions. Tree view shows the level of nesting relationship of the attached xrefs, whether they are attached or overlaid, and whether they are loaded, unloaded, marked for reload or unload, or not found, or unresolved.
See image below:


In the List view the following categories are shown:


Reference Name Lists the names of the xrefs as stored in the definition table for the drawing.

Status
Shows whether the xref is loaded, unloaded, not found, unresolved, orphaned, or marked for unloading or reloading.

  • Loaded: Currently attached to the drawing.
  • Unloaded: Marked to be unloaded from the drawing once the Xref Manager is closed.
  • NotFound: No longer exists in the valid search paths.
  • Unresolved: Cannot be read by this program.
  • Orphaned: Attached to another xref that is unresolved, or not found.

Size Shows the file size of the corresponding reference drawing. The size is not displayed if the xref is unloaded, not found, or unresolved.

Type
Indicates whether the xref is an attachment or an overlay.


Date Displays the last date the associated drawing was modified. This date is not displayed if the xref is unloaded, not found, or unresolved.

Saved Path
Shows the saved path of the associated xref (this is not necessarily where the xref is found).

The following commands are available in both List and Tree views.

Attach Displays the External Reference dialog box if an external reference is selected or displays the Select Reference
File dialog box if no external reference is selected. See XATTACH.

Detach Detaches one or more xrefs from your drawing, erasing all instances of a specified xref and marking the xref definition for deletion from the definition table. Only the xrefs attached or overlaid directly to the current drawing can be detached; nested xrefs cannot be detached. An xref reference
d by another xref or block cannot be detached.

Reload Marks one or more xrefs for reloading. This option rereads and displays the most recently saved version of the drawing.

Unload Unloads one or more xrefs. Unloaded xrefs can be easily reloaded. Unlike detaching, unloading does not remove the xref permanently. It merely suppresses the display and regeneration of the xref definition to improve performance.

Bind Displays the Bind Xrefs dialog box. The Bind option makes the selected xref and its dependent named objects (such as blocks, text styles, dimension styles, layers, and linetypes) a part of the current drawing.

Binding an xref converts the xref definition of that xref to a standard local block definition named the same as the xref. If you bind an xref into the current drawing, the xref and all its dependent named objects become a part of the current drawing. Use XBIND to add individual xref-dependent named objects, such as blocks, text styles, dimension styles, layers, and linetypes, to the local definition table.

The two methods of binding xrefs to the current drawing are Bind and Insert. These two different methods are explained below:




Bind Choosing the Bind button will bind the selected xref definition to the current drawing. Xref-dependent named objects are changed from blocknamedefinitionname to blockname$n$definitionname syntax. In this manner, unique named objects are created for all xref-dependent definition tables bound to the current drawing. For example, if you have an xref named XA-BASE containing a layer named A-WALL-FULL-N, after binding the xref, the xref-dependent layer XA-BASEA-WALL-FULL-N becomes a locally defined layer named XA-BASE$0$A-WALL-FULL-N. The number in $n$ is automatically incremented if a local named object with the same name already exists. In this example, if XA-BASE$0$A-WALL-FULL-N already existed in the drawing, the xref-dependent layer XA-BASEA-WALL-FULL-N would be renamed XA-BASE$1$A-WALL-FULL-N.




Insert Choosing the Insert button will insert the xref to the current drawing in a way similar to detaching and inserting the reference drawing. Rather than being renamed using blockname$n$definitionname syntax, xref-dependent named objects are stripped of the xref name. As with inserting drawings, no name-incrementing occurs if a local named object shares the same name as a bound xref-dependent named object. The bound xref-dependent named object assumes the properties of the locally defined named object. For example, if you have an xref named XA-BASE containing a layer named A-WALL-FULL-N, after binding with the Insert option; the xref-dependent layer XA-BASEA-WALL-FULL-N becomes the locally defined layer A-WALL-FULL-N.



Open
Opens the selected xref for editing in a new window. The new window is displayed after the Xref Manager is closed.

Working with Xrefs


To attach an xref, use XREF to display the Xref Manager or use XATTACH. You can also use DesignCenter™ to attach xrefs to a drawing. Use DesignCenter for simple attachments, previewing external references and their descriptions, and quick placement by dragging. You can attach an xref by dragging it from DesignCenter or by clicking Attach as Xref on the shortcut menu.

Visibility, Color, and Linetype

You can control the visibility, color, linetype, and other properties of an xref's layers and make these changes temporary or permanent. If the VISRETAIN system variable is set to 0, these changes apply only to the current drawing session. They are discarded when you end the drawing session, or when you reload or detach the xref. It is preferred that you set VISRETAIN system variable to 1, this will keep your sheet specific layer changes and won’t change them back to how the original drawing displayed.

Xref Clipping Boundaries

Drawings can include xrefs that are clipped. If you want to see the clipping boundary, you can turn on the XCLIPFRAME system variable. This variable Controls the visibility of xref clipping boundaries. Setting XCLIPFRAME system variable to 0 will make clipping frame not visible. Setting it to 1 will make t
his frame visible.

Xref Attachment Methods

Xrefs can be nested within other xrefs: that is, you can attach an xref that contains another attached xref. You can attach as many copies of an xref as you want, and each copy can have a different position, scale, rotation and even name.

In the following illustration, master.dwg references a.dwg and b.dwg. Drawing a.dwg references c.dwg. In master.dwg, c.dwg is a nested xref.
You can also overlay an xref in your drawing. Unlike an attached xref, an overlaid xref is not included when the drawing is attached or overlaid as an xref to another drawing. Overlaid xrefs are designed for data sharing in a network environment. By overlaying an xref, you can see how your drawing relates to the drawings of other groups without changing your drawing by attaching an xref.









In the following illustration, several people are working on drawings referenced by master.dwg. The person working on a.dwg needs to see the work being completed by the person working on b.dwg, but does not want to attach b.dwg because it would then appear twice in master.dwg. Instead, the person overlays b.dwg, which is not included when a.dwg is referenced by master.dwg.
















Relative Saved Paths and Nested Xrefs

The saved path for an xref can be an absolute (fully specified) path, a relative (partially specified) path, or no path. For a nested xref, a relative path always references the location of its immediate host and not necessarily the currently open drawing.

You can view and edit the file name and path that the program uses when loading an xref. Use this option if the xref drawing file has been moved to a different folder or renamed since it was first attached.

You can choose from three types of folder path information to save with an attached external reference:

  1. an absolute path
  2. a relative path
  3. no path.
Specify an Absolute Path

An absolute path is a fully specified hierarchy of folders that locates the external reference. An absolute path includes the local hard drive letter or the network server drive letter. This is the most specific but least flexible option. WE SHOULD NEVER USE THIS OPTION.

Specify a Relative Path

Relative paths are partially specified folder paths that assume the current drive letter or the folder of the host drawing. This is the most flexible option, and enables you to move a set of drawings from your current drive to a different drive that uses the same folder structure. If the drawing file that is being referenced is located on a different local hard drive or on a network server, the relative path option is not available.


The conventions for specifying a relative folder path are as follows:

  • \ Look in the root folder of the host drawing’s drive
  • \path From the root folder, follow the specified path
  • .\path From the folder of the host drawing, follow the specified path
  • ..\path From the folder of the host drawing, move up one folder level and follow the specified path.
  • ..\..\path From the folder of the host drawing, move up two folder levels and follow the specified path.
Note: If a drawing that contains xrefs is moved or saved to a different path, to a different local hard drive, or to a different network server, you must edit any relative paths to accommodate the host drawing’s new location or you must relocate the referenced files.

Specify No Path

When no path information is saved with the attached external reference, the following search is initiated in the order shown:

  1. Current folder of the host drawing
  2. Project search paths defined on the Files tab in the Options dialog box.
  3. Support search paths defined on the Files tab in the Options dialog box.
  4. Start In folder specified in the Microsoft® Windows® application shortcut
Specifying the No Path option is useful when moving a set of drawings to a different folder hierarchy or to an unknown folder hierarchy.

Know When an External Reference Has Been Relocated

If the drawing you are working on contains an xref that has been moved to a different folder, a message is displayed at the site of the xref when you load the drawing. The message indicates that the xref cannot be loaded using the old path. When you specify the new path, the xref is reloaded into your drawing.