Using an eXternal reference file (Xref) in the current drawing is similar to using Insert to insert a drawing file into the current file
- except when you Open a host (a drawing that references external files) the current version of each referenced file is used
- whereas, when you Insert a drawing into another drawing, there is no link back to the inserted (external) drawing file.
- Xrefs are practical in large projects because several differentpeople can work on separate Xref components at the same time.
Assembly drawings are a typical application for reference files.
- assembly drawings (hosts) reference component files (Xrefs).
- any changes to component files (Xrefs) are automatically updated in the assembly drawing file (host).
When you use Xrefs you can be sure that your host drawing files are always up-to-date
- but you must manage your drawing files carefully to be sure the externally referenced drawings are always accessible.
- otherwise, when you Open your host drawings you may not see all of the required drawing data.
You can also share common elements in related drawings as Xrefs.
For example, a Floor Plan.dwg could be referenced in many other drawings that relate to the walls in an office design.
- an Architectural.dwg could reference the Floor Plan.dwg with information specific to this discipline (e.g. wall dimensions).
- an Electrical.dwg could reference the Floor Plan.dwg to show electrical outlets relative to the walls.
- an Interior Design.dwg could reference the Floor Plan.dwg to show furniture relative to the walls.
Any changes to the Floor Plan.dwg would be automatically updated when you Open any of the host drawings.
You can also use Xrefs temporarily to help ensure that mating drawings match.
You can cleanly detach an Xref without a trace later on.
You can use the Xattach command to explicitly attach external drawings as new Xrefs in the current drawing.
- the External Reference dialogue box will be familiar to you if you already know how to use the Insert command.
PRACTICE ATTACHING NEW XREFS
1) Launch AutoCAD (if required). Pick File + Open and select the T202_1.dwg drawing file in your personal folder. Close all other drawings (if other drawings are open).
»2) Next Open the T202_2.dwg in your personal folder.
»3) Pick Tools + Run Script. Select the T202.scr script file in your personal folder and pick the Open button there to run this script. This sets several system variables to match the behavior illustrated in this manual.
»4) Pick Window + Tile Vertically.
»5) With T202_2.dwg the active drawing, pick View + Zoom +
Extents. Then pick View + Zoom + Out.
»6) Left-click once in the T202_1.dwg window to make it the active drawing. Pick View + Zoom + Extents. Then pick View + Zoom + Out.
The T202_1.dwg drawing contains the walls in a floor plan that you will reference in the T202_2.dwg drawing file
- at the moment the T202_2.dwg drawing contains only the dimensions for these walls.
- you can think of this T202_2.dwg as the Architectural drawing illustrated on page 4 (but it is missing the walls).
You have both drawings Open at the same time.
- in a networked environment, these two drawings could be opened for editing by two different people at the same time.
7) Left-click once in the T202_2.dwg window (the drawing with the dimensions) to make this the active drawing.
8) Pick Insert + Xref Manager. Then pick the Attach button.
9) Navigate to your personal folder & select the T202_1.dwg (the floor plan) & pick the Open button to continue.
10) Uncheck all Specify On-screen boxes then pick OK.
11) Pick OK when AutoCAD warns that T202_1.dwg is already opened for editing.
You get the above message if you (or someone else on your network) already have the selected drawing file open for editing.
- for more related information use AutoCAD Help for the XLOADCTL system variable.
12) Left-click once in the T202_1.dwg window to make it the active drawing.
13) Pick Modify + Stretch. Pick corners near P1 then P2 to invoke an implied Crossing tool. Press <enter> to continue and enter 0,48 as the displacement. Press <enter> at the next prompt for the second point of displacement.
14) Pick File + Save to update this change in the floor plan drawing to your hard disk.
15)Left-click once in the T202_2.dwg window to make this the active drawing again.
16) Pick Insert + Xref Manager. Select the T202_1 Xref and pick the Reload button to load the new (modified) version of the external reference into the current drawing. Pick OK.
17) Pick OK when AutoCAD warns that this drawing is already open for editing.
You do not have to manually reload drawings.
- the host drawing will automatically load the current version of all referenced files whenever you Open the host.
18) Left-click in the T202_1.dwg window to make it active.
19)Pick Edit + Undo. Then pick Edit + Undo again to undo the Stretch operation. The floor plan should now be the original size as when you began the exercise.
20) Pick File + Save to update these changes to the floor plan. Then Close the T202_1.dwg drawing file.
21) Pick File + Save to update the changes to the T202_2.dwg (the architectural plan). Then Close this drawing file.
- The architectural plan (T202_2.dwg) now references the floor plan.
the floor plan (T202_1.dwg) is back to the original size that it was before you used Stretch in this exercise.
- both drawings are closed so there should be no drawings open in AutoCAD right now.
22) Open the T202_2.dwg in your personal folder again.
The current drawing (the host) loads the latest version of the floor plan (saved on disk) so the dimensions match the floor plan again.
- compare your screen with the illustrations on the previous page.
When you work with reference files you must remember that any changes made to one drawing may affect many other drawings.
- if you work with several other people on a project you should establish a process to notify others about drawing file changes.
- even if you create all of the drawings yourself you must carefully manage the changes to referenced drawings.
23) Pick Insert + Xref Manager. Select the T202_1 Xref and pick the Unload button. Then pick OK.
The referenced floor plan is no longer displayed in the current drawing file.
- all you see now are the dimensions that are stored in the current drawing file.
When you Unload an Xref the current drawing no longer displays drawing data from the reference file.
- this can also free up your system resources to improve performance when the unloaded reference file is very large.
You can Unload Xrefs until you actually need them in the drawing
- then use the Xref command to Reload the unloaded Xrefs back into the drawing in a single step.
24) Pick Insert + Xref Manager. Select the T202_1 Xref and pick the Reload button to load the floor plan back into the current drawing. Then pick OK.
Now the floor plan is displayed precisely in the same place using the same insertion parameters again.
25)Pick Insert + Xref Manager. Select the T202_1 Xref and then pick the Detach button. Pick OK.
When you Detach an Xref it is completely purged from the host drawing file.
- this is a desirable feature if you temporarily attach an Xref (e.g. when you are designing matching components).
- in comparison, when you Insert a drawing into the current drawing you can create a big “mess” that is difficult to undo
26) Save the changes to the current drawing and Close this file.
27) Pick File + Open. Select both T202_3.dwg and T202_4.dwg in your personal folder and pick the Open button to open both drawings concurrently.
28) Pick Window + Tile Vertically. Zoom Extents then Zoom Out in each window.
29) Xattach the floor plan (T202_1.dwg) as an Xref to these files then Save the changes to these drawings.