0 Members and 1 Guest are viewing this topic.
(ssget "x" '((1 . "")))
;_____________________________________________________________________________ ;; DELETES NUL LINES OF TEXT, MTEXT, AND BLOCKS ;_____________________________________________________________________________ (if (setq TXT (ssget "X" '((-4 . "<and") (-4 . "<or") (0 . "MTEXT") (0 . "TEXT") (-4 . "or>") (-4 . "<or") (1 . "") (1 . " ") (1 . " ") (1 . " ") (1 . "{}") (1 . "{ }") (1 . "{ }") (1 . "{ }") (1 . "{}\P") (1 . "{ }\P") (1 . "{ }\P") (1 . "{ }\P") (-4 . "or>") (-4 . "and>") ) ) ) (progn (command "_erase" TXT "") (princ (strcat "\n " (itoa (sslength TXT)) " nul text strings deleted. " ) ) ) (princ "\n No nul text strings found. ") ) (setq BLK (tblnext "BLOCK" T) NAMES nil ) (while BLK (if (= (cdr (assoc 0 (entget (cdr (assoc -2 BLK))))) "ENDBLK") (progn (if (setq NB (ssget "X" (list (assoc 2 BLK)))) (command "_erase" NB "") ) (setq NAMES (cons (cdr (assoc 2 BLK)) NAMES)) ) ) (setq BLK (tblnext "BLOCK")) ) (if NAMES (progn (textscr) (princ "\n Nul blocks found and need purging: ") (foreach X NAMES (princ "\n ") (princ X)) ) (princ "\n No nul blocks found. ") ) (princ) )
Did you see this code on this thread?