vernonlee Posted November 27, 2014 Share Posted November 27, 2014 (edited) Deleted.............. Edited December 3, 2014 by vernonlee Quote Link to comment Share on other sites More sharing options...
ttray33y Posted November 28, 2014 Share Posted November 28, 2014 1 solution i can think of is creating an updated block for the blocks with hatch etc. then batch redefine those blocks at once. would you mind posting/attaching your drawing here with those blocs you mentioned. Quote Link to comment Share on other sites More sharing options...
vernonlee Posted November 28, 2014 Author Share Posted November 28, 2014 1 solution i can think of is creating an updated block for the blocks with hatch etc.then batch redefine those blocks at once. would you mind posting/attaching your drawing here with those blocs you mentioned. Hi bro. Do not quite understand your question. To clarify, i am looking for a clean up drawing routine through LISP. I already have LISP for removing dimensions & hatches. What i still lack is Text, Mtext & leader lines removing LISP. Hope that clarify. Quote Link to comment Share on other sites More sharing options...
ttray33y Posted November 28, 2014 Share Posted November 28, 2014 (edited) try this bro, however it does not delete nested object inside blocks. (defun c:test2(/ cntr eset en cnt) (setvar "cmdecho" 0) (setq eset (ssget"X" (list (cons -4 "<OR") (cons 0 "ARC") (cons 0 "ATTRIBUTE") (cons 0 "CIRCLE") (cons 0 "ELLIPSE") ;(cons 0 "INSERT") (cons 0 "LINE") (cons 0 "LWPOLYLINE") (cons 0 "MLINE") (cons 0 "MTEXT") (cons 0 "POINT") (cons 0 "POLYLINE") (cons 0 "SOLID") (cons 0 "TEXT") (cons 0 "TRACE") (cons 0 "XLINE") (cons 0 "LEADER") (cons 0 "HATCH") (cons -4 "OR>") ) ) ) (if (and eset (> (sslength eset) 0)) (progn (setq cnt(sslength eset)) (command "ERASE" eset "") (alert (strcat "Erased " (itoa cnt) " Entities.")) ) ) (setvar "cmdecho" 1) (princ) ) (princ "\n Type test2.") (princ "\nttray33y CADTutor.") for deleting objects from nested blocks, see link below http://www.cadtutor.net/forum/showthread.php?69075-Delete-entity-in-nested-block Edited November 28, 2014 by ttray33y Quote Link to comment Share on other sites More sharing options...
vernonlee Posted November 28, 2014 Author Share Posted November 28, 2014 try this bro, however it does not delete nested object inside blocks. (defun c:test2(/ cntr eset en cnt) (setvar "cmdecho" 0) (setq eset (ssget"X" (list (cons -4 "<OR") (cons 0 "ARC") (cons 0 "ATTRIBUTE") (cons 0 "CIRCLE") (cons 0 "ELLIPSE") ;(cons 0 "INSERT") (cons 0 "LINE") (cons 0 "LWPOLYLINE") (cons 0 "MLINE") (cons 0 "MTEXT") (cons 0 "POINT") (cons 0 "POLYLINE") (cons 0 "SOLID") (cons 0 "TEXT") (cons 0 "TRACE") (cons 0 "XLINE") (cons 0 "LEADER") (cons 0 "HATCH") (cons -4 "OR>") ) ) ) (if (and eset (> (sslength eset) 0)) (progn (setq cnt(sslength eset)) (command "ERASE" eset "") (alert (strcat "Erased " (itoa cnt) " Entities.")) ) ) (setvar "cmdecho" 1) (princ) ) (princ "\n Type test2.") (princ "\nttray33y CADTutor.") for deleting objects from nested blocks, see link below http://www.cadtutor.net/forum/showthread.php?69075-Delete-entity-in-nested-block Thanks again for the effort. I truely require one that does in deep nested levels since the drawings i encounter has many block within blocks Quote Link to comment Share on other sites More sharing options...
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.