Tip Patrol member Billy Wooten sent us a LISP routine he created that unloads an xref by picking on it. "Although this routine will unload an xref, it won't detach it, so the xref is still referenced. If the object is a block or other object instead of an xref, the routine identifies it as such and instructs the user via the Command line to try again." (defun c:ux (/ tData XName);Identify/Unload Xref (defun *error* (msg) (princ " ") ) (while (setq tData (entget (car (entsel " Select Item to Test for Xref")))) (if (setq XName (cdr (assoc 2 tData))) (if (assoc 1 (tblsearch "BLOCK" XName)) (progn (command ".xref" "u" XName) (prompt (strcat " Xref " XName " unloaded" )) ) (princ " Block Selected - Try Again") );if (princ " Entity in Base Drawing - Try Again") );if );while (princ) ) Notes from Cadalyst Tip Patrol: This routine is simple and quick, and it works well. Thanks, Billy!
Tested in AutoCAD 2010 |