TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: hudster on February 14, 2004, 09:24:27 AM
-
I've accidentally deleted my copy and I can't find it anywhere on the net. :oops:
Cheers
Andy
-
What is it supposed to do?
-
is it still in your recycle bin?
-
Nah it's gone for good, I've checked and I couldn't get it back.
it's a lisp routine that deletes null objects from a drawing, empty text strings etc.
It was handy for cleaning up Architects layouts we receive.
-
Let Google be your friend.
CADALYST December 1997
Tip1390.LSP: DELNUL.LSP Delete Null Entities (Bill Fane)
Is this the routine ??
;; DelNul.lsp
;; Deletes nul lines of Text, Mtext & Blocks.
;; Modified by JL Thomas 12/02/97
(Defun C:DelNul ( / TXT BLK NB NAMES)
(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)
)
(c:DelNul)
-
Yip thats it.
Strange though, i searched on cadalyst and didn't find anything.