# Reference Manager. Post 15 in series “AutoCAD Cleanup”

## Using Reference Manager to re-link data set.

Scenario: You received a set of files on CD. The folder structure conforms to your company standard, but when you open plot files, XREFs are not found. You need to re-link all XREFs.

• Copy the CD contents to a local drive and examine its folder structure.
• Start by figuring out which files are intended to be the plot-able sheet files. This is the hardest part. You can use the transmittals, printouts, thumbnail images and/or any other means at your disposal. Sometimes you can guess from the folder structure or the file name. In this example it looks like all the plot sheets should be in a discipline specific subfolder of the plot folder.
• Once you have a working assumption of which files are the plot sheets, you can begin solving the puzzle. Start Reference Manager.

• Add the sheet files to be analyzed. I always work in batches based on plot file locations. You will be asked if you want to add all XREFs that are attached to the drawings being added. If you select “Yes”, then all nested XREFs will be added, and it can get large and confusing very quickly. In addition, you can also encounter circular referencing. When dealing with large sets, it is easier to process one level of nesting at a time by answering “No” and adding XREFs for processing later.

• The Reference Manager interface has two views.

• First, view the List by Drawing view to find out if any drawings are “broken”. In List by Drawing view, the left pane shows a hierarchical data structure with all resource files listed per drawing. If any of the XREFs or other resources are not found the drawing icon is crossed by a red line. In the right pane you can see all the needed resources. You can sort them any way you want. (by type, status, saved path, found path or any other column).

• Now let’s attempt to repair all broken links. Change to the List by Reference Type view. Select XREFs in the left pane. Sort the right pane by status.

• The missing XREFs saved path points to the P: drive. But your system does not have a P: drive. To remedy this situation and make your data set portable, you need to convert the full path to a relative path. Looking at the folder structure and saved path you can guesstimate that the XREFs should be in the discipline specific folder under the ref folder.
• The path is relative to the location of the parent (host) file. But in this batch all plot files reside in the same folder. Select all XREFs with identical saved path. Click on Edit Selected Paths, and then change the path. To get from the location of the host file to the location of the XREFs, you need to go two levels up the folder tree, then go down to the \ref\arch folder.

• You guessed right, and the status of the XREFs changed to Resolved with a pencil logo (pencil-in feature) indicating that the change is not yet applied. Click on Apply Changes to write the new paths into the host files. The status changes to Resolved.
• Process the rest of the files in groups based on the location of the host file and saved paths. If the path is not resolved for loaded XREF (open the host file to check if it is loaded) and you can’t find the file in any folder, you simply do not have it. I usually click on Export Report at this time, and examine host files to see if a missing XREF can be safely detached or whether I need to hunt them down.
• If you have any image references, their re-pathing is identical to re-pathing for XREFs.
• You do not need to worry about Plot Configurations because your plotters/printers are different anyway.
• Missing Plot Styles will result in problems with plot line thickness and colors, but in a pinch you can try Monochrome.ctb or Monochrome.stb
• If there are “not found” Fonts and Shapes, try to purge everything, and then run the reference manager report again. If the font is still not found and you can’t get it, AutoCAD will use the substitute font. Alternatively, you may want to use a font mapping table to specify which font AutoCAD substitutes when it encounters a text object created with another font. Windows True Type Fonts are independent of AutoCAD resource folders; they belong to the operating system.

# Attachments, overlays, full, relative and no Path. Post 14 in series “AutoCAD Cleanup”

### External References. Basic concepts

Data sets in AutoCAD are a collection of all files that are needed to produce graphic output for an entire project or its subsets.
It may contain various file types: drawing files, image files, font files, shape files, plot style files and other types of linked files.
Drawing files (.DWG) of the same data set are usually linked to each other forming a hierarchical XREF structure.
To understand and be able to manipulate the dataset structure you need to know the properties of XREF links.

### Attachment VS Overlay

AutoCAD uses two types of DWG references: attachments and overlays

All XREFs that are linked (attached or overlaid) directly to the parent file are visible in that file.

The second (and any subsequent) tier XREFs are only visible if they are attachments. In the schema below you will only see XREF1, XREF2, XREF3 and XREF5 from the PLOT file.

An easy way to remember: attachments are babies – they follow their parents. Overlays are teenagers – they never go with their parents.

### Full Path, Relative Path and No Path.

XREFs and image files can be linked to master files using full path, relative path or no path.
Full path can be compared to a street address; it is an exact location of the XREF or attached image on your system. It includes server name or mapped drive name.

Relative path is like point-to-point directions from the parent file to its reference. It finds the reference based on the location the parent file. The relative path says: go several levels up the directory tree (usually to where the directory tree starts branching) then from that point go to the location indicated after the last “..”
In the following example the parent file is plot.dwg. The location of plot.dwg in the folder structure is shown on the picture on the left. All references (XREFs and images) are stored at ..EX4drawingsrefarch folder.

The relative path to REF1 and REF2 from the location of plot.dwg takes us two levels up to the EX4drawings folder, then from there to ..refarch.

This method makes the data sets portable because the path does not contain server name or mapped drive name.. In other words, if I copy the entire EX4drawings folder to any other location (CD, DVD or any network location), plot.dwg finds its references.
If no path is selected, AutoCAD will first look for XREFs and images in the same folder as the parent file, then in the search path folders. The support search paths, working search paths and project search paths are user profile specific and can be set up in Options->Files. The search path folders could vary for different systems and profiles.

# Replace an XREF with another XREF. Post 5 in series “AutoCAD Cleanup”

If you are using XREFs for borders, you can use script to replace a current border with a different one. This example assumes that

• the layer G-Xref exists (but if not, you can script making it
• the border needs to be overlayed in the paperspace
• old and new border have the same position in respect to 0,0,0

The following script replaces the XREF border CD_SHEET_E_VERT in paperspace. You may use it to replace XREF borders from a consultant with your company border.

The new border BR08-4851.DWG is overlaid on G-XREF layer and its full path is then converted to relative path (we will talk more about full and relative paths in future posts)

TILEMODE 0
-XREF D CD_SHEET_E_VERT
-LAYER S G-XREF
blank line
-XREF O P:\4000\4851\DRAWINGS\REF\ARCH\BR08-4851.DWG
0,0,0 1 1 0
-XREF P “BR08-4851″
..\..\REF\ARCH\BR08-4851.DWG
QSAVE
blank line