Okay, I thought I had, or could find this one on my own, but I'm stumped! I recall an "eraser" routine that would delete entities as your cursor crossed over them. I have a LOT of things to delete and this would be useful. Does anyone have this routine or know where to download it from? TIA! Regards, --------------- Reid M. Addis Registered Architect Architectural Applications Specialist Granary Associates 411 North 20th Street Philadelphia, PA 19130 Ph. 215-665-7056 email: p.s. sorry about the double post in the adt customization group. You can delete that one
Here is a quickie. HTH (defun C:eraser (/ ent) (while (if (setq ent (car (nentselp (cadr (grread T 13 2))))) (progn (command "erase" ent "") T) T ) ) (princ) ) -- Ken Alexander Acad2000 Windows2000 Prof. "We can't solve problems by using the same kind of thinking we used when we created them." --Albert Einstein
Is it just me, or does that sound like a dangerous rotine? I can just see someone dropping a book or something on my desk and erasing half my drawing.
undo? -- Ken Alexander Acad2000 Windows2000 Prof. "We can't solve problems by using the same kind of thinking we used when we created them." --Albert Einstein just see someone dropping a book or something on my desk and erasing half my drawing.
Then throw the book back. <g> -- Ken Alexander Acad2000 Windows2000 Prof. "We can't solve problems by using the same kind of thinking we used when we created them." --Albert Einstein just see someone dropping a book or something on my desk and erasing half my drawing.
Better to use (entdel ent) rather than (command "erase" ...). With (command ...) the routine will hang on complex objects. Even with (entdel ent), complex objects (blocks, polylines ...) will be ignored, but at least the routine won't hang. (defun C:ERASER (/ ent) (while T (if (setq ent (car (nentselp (cadr (grread T 4 2))))) (entdel ent) );; if );; while (princ) ) ___
Gottcha....Thanks. -- Ken Alexander Acad2000 Windows2000 Prof. "We can't solve problems by using the same kind of thinking we used when we created them." --Albert Einstein
Thanks everyone! Ken's and Paul's were great, but they had no "safety net". The one from André Cumuli in the Catalyst code allows you to hit the enter key to toggle erase on and off, plus some other features, making it a bit easier and safer to use! Thanks again. You guys are "de man!" -- Regards, --------------- Reid M. Addis Registered Architect Architectural Applications Specialist Granary Associates 411 North 20th Street Philadelphia, PA 19130 Ph. 215-665-7056 email:
Works here and it's great! Of course, I did a little editing of the file, so there may be an errant symbol or two in it. Anyone who wants a copy just email me and I'll send it to you. -- Regards, --------------- Reid M. Addis Registered Architect Architectural Applications Specialist Granary Associates 411 North 20th Street Philadelphia, PA 19130 Ph. 215-665-7056 email:
may be an alternative way, it's not to delete entities, but simply change on a new off layer : delete_tmp. Bruno Toniutti (sorry for my english level)