;this little routine checks for any xrefs and writes the Qty to a File (defun hasxref() (while (setq XREF_CHK (tblnext "block" first)); while there are stillblocks to check ; (setq first nil) (if (= 4 (logand 4 (cdr (assoc 70 XREF_CHK)))) ; look to see if any areunloaded xrefs (setq WORK (cons (cdr (assoc 2 XREF_CHK)) WORK)) ; if so, add them tothe list ) ) (if (/= (vl-list-length work) 0) (progn (setq f (open "C:\\Temp\\HASXREF.LOG" "a")) (write-line (strcat "[" (strcase (vl-filename-base (getvar "dwgname"))) "] has " (rtos (vl-list-length WORK)2 0) " Xrefs!") f) (close f) ) ;;; (progn ;;; (setq f (open "C:\\Temp\\HASXREF.LOG" "a")) ;;; (write-line (strcat "[" (strcase (vl-filename-base (getvar "dwgname"))) "] IS CLEAN...") f) ;;; (close f) ;;; ) ) )S CLEAN...") f) ;;; (close f) ;;; ) ) )