External references (xrefs) and data shortcuts (drefs) are two methods of attaching and referencing data from other projects in Civil 3D.
In the December Infrastructure Tuesday webinar, I took a look at xrefs and drefs and some of the advantages and disadvantages of each. Read on to learn more about recent xref enhancements and some tips and tricks for using drefs.
Types & Terms
There are two different types of xrefs: Overlay and Attach. If you use an Overlay, that information will not follow your drawing as it is xrefed in other drawings in the future. Attached xrefs on the other hand will follow your drawing. This can cause some issues if people don’t understand the difference between overlay and attach; you may have even encountered this before. If you xref a drawing that has attached drawings, everything attached is going to come into your drawing with the xref. However, if you’ve already overlaid one of the attached drawings, you won’t be able to complete the xref. Basically, using Attach can cause circular referencing to happen. To avoid this, you should overlay your xrefs instead of attaching them.
There are also two commands that you should be familiar with: xrefbind and xrefinstert. Though bind and insert sound similar, the results are very different. When you use xrefbind, you’ll find that you end up with some funky layering and a block of objects that are no longer xrefs. Xrefbind increments the layers from the drawing you are xrefing and you end up with layers in your drawing with $0$ in the name. When you use xrefinsert, however, you end up with unique layers in your drawing.
Enhancements in Civil 3D 2018
In Civil 3D 2018, when you attach an xref, the default reference type is Overlay and default reference path is Relative. This was not the case in prior versions. You may remember in previous versions of AutoCAD and AutoCAD-based products, in order to do a relative path, you first had to save your drawing. So you would see a dialogue box telling you to save the drawing before allowing you to continue. In Civil 3D 2018, you don’t have to do that. The relative path simply shows as pending until you save your drawing.
There’s also a new system varialble in Civil 3D 2018 called refpathtype. With refpathtype, a vaule of 0 indicates no path, a value of 1 indicates a relative path, and a value of 2 indicates a full path. The default value is 1, and the value must be an integer between 0 and 2.
- Xrefs have been around for many years, and, as a result, most CAD users are familiar with them and comfortable using them.
- Since the release of Civil 3D 2012, you can label civil objects in xrefs.
- You cannot change styles with xrefs, and, therefore, cannot change things like label increments or contour intervals.
- Xrefs do not bring in as much data as data shortcuts which prevents you from being able to perform some functions, such as drawing an alignment on top of a surface and cutting profiles.
Civil 3D 2018 also includes a tool to help resolve broken xref paths. In this video, I demonstrate how to select a new path or find and replace and apply the changes to other missing references.
Looking for more of my civil infrastructure tips and tricks? Then check out these quick reads.
Styles & Templates
The way you set up data shortcuts is critical. When using data shortcuts, you first need to set a working folder and create a new data shortcut project folder. Additionally, by default, under your Civil 3D installation folders, you’ll find a folder called Civil 3D Project Templates. Project templates are a way to set up an actual project directory without additional folders. There is a sample project template that is installed with Civil 3D, but you can also create your own. I like to include documents, external references, images, source drawings—nothing fancy.
Tips & Tricks
It’s important to make sure your pathing in your drawing is proper. If you place several labels in a drawing and then an xref or dref path goes wacky, you’ll likely see a bunch of question marks in your drawing. But, remember, if you open the Properties palette, you can re-path the data and reassociate it to the parent alignment, surface, etc. to make your labels will come back.
- You can change the styles of objects with data shortcuts to see a different contour interval, a completely different style, etc.
- Data shortcuts bring in all associated data, such as all of the surface data, so you can draw and alignment, cut a profile, etc.
- Your data does not have to all be contained in the same drawing to work as it did in past versions of Civil 3D.
- Data shortcuts don’t allow for data versioning with tools like Autodesk Vault.
- You cannot set up integrity control, or user access levels, with data shortcuts.
Have you used the Data Shortcuts Editor before? This tool can be used for bulk operations on data shortcuts, for example, when you need to fix broken references. In this clip, I demonstrate how I use the Data Shortcuts Editor to cut, copy, past, or find and replace when pathing is corrupted or lost.
Have questions about using xrefs or drefs? Leave them in the comments below.