TunzaGibbo Posted December 20, 2018 Posted December 20, 2018 Hi All Is there a command in Autolisp that allows me to delete all objects on a certain layer? Quote
gS7 Posted December 20, 2018 Posted December 20, 2018 (edited) Did you tried LayDel Command ? Edited December 20, 2018 by gS7 Quote
TunzaGibbo Posted December 20, 2018 Author Posted December 20, 2018 Yes I have tried that and of course it works I guess it was a silly question from the start Quote
Tharwat Posted December 20, 2018 Posted December 20, 2018 FYI, the laydel command would delete all objects on a certain layer name and delete the layer object itself from the drawing, so if you have other objects in the drawing and even in a block then they would be deleted as well. Finally deleting object(s) on a certain layer does not mean to delete the layer name to delete the object(s) that reside(s) on that layer. Quote
TunzaGibbo Posted December 20, 2018 Author Posted December 20, 2018 Thanks again The idea here is that once I have finished using my construction lines I want to hit a command and they will all be deleted Quote
gS7 Posted December 22, 2018 Posted December 22, 2018 On 12/20/2018 at 4:17 PM, TunzaGibbo said: Thanks again The idea here is that once I have finished using my construction lines I want to hit a command and they will all be deleted you mean you want to delete all objects from "construction lines " layer ? (setq OB (ssget "x" (LIST (CONS 8 "construction lines" )))) (command "Erase" OB "") Quote
TunzaGibbo Posted December 22, 2018 Author Posted December 22, 2018 On 12/20/2018 at 6:28 PM, Tharwat said: FYI, the laydel command would delete all objects on a certain layer name and delete the layer object itself from the drawing, so if you have other objects in the drawing and even in a block then they would be deleted as well. Finally deleting object(s) on a certain layer does not mean to delete the layer name to delete the object(s) that reside(s) on that layer. 5 hours ago, gS7 said: you mean you want to delete all objects from "construction lines " layer ? (setq OB (ssget "x" (LIST (CONS 8 "construction lines" )))) (command "Erase" OB "") I ended up using the "laydel command" and I realized the objects and the layer are deleted. but next time I run my Xline routine I have a little sub-routine that creates the Construction Layer again Thank you though for that little bit of code I'll store it away for another day Quote
rrage666 Posted October 16, 2019 Posted October 16, 2019 On 12/23/2018 at 9:36 PM, gS7 said: hi, I try to wrote a script with script writer to erase a layer, but when I use laydel, it doesn't work. I wrote this : _open *file* _-laydel _name AFURFR-P _audit _yes _ai_selall _-overkill _done _-purge r * n _-purge _all * n _Qsave _close but the script stop because when it said enter the layer's name, all the rest of the command appear, like this. Enter the layer's name : AFURFR-P _audit _yes _ai_selall _-overkill _done _-purge r * n _-purge _all * n _Qsave _close layer's name invalid... can you help me please. Quote
BIGAL Posted October 16, 2019 Posted October 16, 2019 Laydel asked me for yes / no may be missing. 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.