;;;Detach selected XREF. ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: ;;;> EDITED: 12-30-2005 ;;; (DEFUN c:xrdet (/ rtnswp) (IF (= "INSERT" (CDR (ASSOC 0 (ENTGET (CAR (SETQ xrent (ENTSEL "\nPick XREF to detach. "))) ) ;_ end of ENTGET ) ;_ end of assoc ) ;_ end of cdr ) ;_ end of = (PROGN (SETQ xrname (CDR (ASSOC 2 (ENTGET (CAR xrent))))) (SETQ xrfins (SSGET "X" (LIST (CONS 2 xrname))) xrfcnt (SSLENGTH xrfins) ) (TBLNEXT "block" T) (SETQ tblent (TBLSEARCH "block" xrname)) (IF (AND (EQ xrfcnt 1)(= (REM (CDR (ASSOC 70 tblent)) 4) 0)) (progn (COMMAND ".xref" "detach" xrname) (princ (STRCAT "\nXref " xrname " has been detached. ")) (princ) ) (COND ((> xrfcnt 1)(PRINC (STRCAT "\nXref \"" xrname "\" has multiple references. Not detached."))) (T (PRINC "\nNot an XREF. ")) ) ) ;_ end of IF ) ;_ end of PROGN (PRINC "\nNot an XREF. ") ) ;_ end of IF (PRINC) ) ;_ end of DEFUN ;|«Visual LISP© Format Options» (72 2 40 2 T "end of " 60 9 2 0 0 T T nil T) ***Don't add text below the comment!***|;