Broydhouse Posted February 13, 2008 Posted February 13, 2008 I am working on a drawing that i have had sent over and it has some blocks that are empty. I can't rember how to delete the whole block. Quote
NBC Posted February 13, 2008 Posted February 13, 2008 if you know the name of the block, use QSELECT, and use Block as your Object Type, in Properties choose Name, in Operator choose Equals, in Value insert the name of your block. once happy with all that, press ok, then once they have all been selected, press Delete key Quote
asos2000 Posted November 9, 2008 Posted November 9, 2008 is there a way to select all empty blocks at one time? Quote
lpseifert Posted November 9, 2008 Posted November 9, 2008 Maybe this will work for you. ; Delete Null Objects ;; 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) Quote
asos2000 Posted November 10, 2008 Posted November 10, 2008 Put this lisp dont delete that blocks Just listing that blocks Quote
hotrodz0321 Posted November 10, 2008 Posted November 10, 2008 draw something (a line or any easily visible object) and create a block out of it but name it the same as the block you are trying to delete, it will ask to redefine the block, select yes....all the blocks should then be visible and you can delete them Quote
asos2000 Posted November 11, 2008 Posted November 11, 2008 hotrodz0321 That what I am doing but using BEDIT, I am searching for a lisp doing that for entire drawing Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.