-XREF — External References (command line)
Lists, binds, detaches, unloads, reloads or changes the path of the external references.
- Command:
-XREF· Global name:_-XREF· Alias:-XR
Manages external references from the command line: lists them, binds them to the drawing, detaches, unloads or reloads them, changes their path or attaches another one. It does the same as the buttons of the XREF window, and it can be used in scripts and AutoLISP.
Usage
- Enter -XREF (or -XR).
- Choose an option; Enter attaches another reference, like XATTACH.
Enter an option [?/Bind/Detach/Path/pathType/Unload/Reload/Overlay/Attach] <Attach>:
- Enter the names of the references. Wildcards are accepted:
*all of them,?one character, and several names separated by commas.
Enter xref name(s) <*>:
Options
- ?: lists the references that match the name, with their type (attached or overlay), path and status.
Enter xref(s) to list <*>:
- Bind (B): turns the reference into a normal block of the drawing, with all its content and that of its nested references. With BINDTYPE = 0 its layers, styles and blocks are renamed
ref$0$name; with 1 they keep their names (if one already exists, the drawing's own is used). - Detach (D): removes the reference and all its inserts. It also removes PDF underlays.
- Unload (U) and Reload (R): stop showing the reference without removing it, or read it again from disk. They also work with PDF underlays.
- Path (P): changes the saved path of each reference; Enter or
~opens the dialog to choose the file.
Xref name: …. Enter new path or <Browse>:
- pathType (T): saves the path of the loaded references as full, relative or just the file name.
Path type [Full/Relative/No path] <Relative>:
- Attach (A) and Overlay (O): attach or overlay another drawing (see XATTACH).
Notes
- Nested references are not bound, detached or unloaded on their own: they are managed from the one that contains them.
- The bound result matches what AutoCAD does: the drawing can be opened there without the reference.
- Everything can be undone with UNDO.
See also
XREF · XATTACH · XCLIP · PDFATTACH · External references