dnovember99 Posted June 6, 2018 Posted June 6, 2018 so i have seen so many different layer deleting lisp routines and i am still so new to all of this that i am not sure where to go. what i am trying to achieve is to be able to type in a command and have a pre-determind list of layer names, select those layers, delete all objects on that layer and then purge the drawing. the reason for this is that we work with one architect on a program style project and all the layers are typically the same. we also have a lisp that we run to clean up all the drawings that come our way. maybe this is something that i would be able to add to this? let me know what you think. or if you think there is anyway that the current lisp can be modified to be better. (defun c:explodable () (load "explodable") (C:explodable) ) explodable (defun c:XRU () (load "XRU") (C:XRU) ) XRU (defun c:burstall () (load "burstall") (C:burstall) ) burstall (defun c:ibase () (load "ibase") (C:ibase) ) ibase (defun c:DeMask () (load "DeMask") (C:DeMask) ) DeMask (defun c:clean0 () ; (getstring "\nClean0 Begin: tempoverrides set to 0") (setvar "tempoverrides" 0) ; (getstring "\nClean0 Begin: Pickstyle to 0") (setvar "pickstyle" 0) ; (getstring "\nClean0 Begin: UCS Reset to 0") (Command "ucsfollow" "0") ; (getstring "\nClean0 Begin: UCS set to World") (Command "ucs" "w") ; (getstring "\nClean0 Begin: INSBase subr") (c:ibase) ; (getstring "\nClean0 Begin: UCS Reset to 0") (Command "ucsfollow" "0") ; (getstring "\nClean0 Begin: UCS set to World") (Command "ucs" "w") ; (getstring "\nClean0 Begin: INSBase subr") (c:ibase) ; (getstring "\nClean0 Begin: PLAN") (Command "PLAN" "w") ; (getstring "\nClean0 Begin: angbase") (Command "angbase" "0") ; (getstring "\nClean0 Begin: snapang") (Command "snapang" "0") ; (getstring "\nClean0 Begin: ZoomExt") (c:ze) ; (getstring "\nClean0 Begin: s0") (c:s0) ; (getstring "\nClean0 Begin: Visretain Set to 1") (setvar "VISRETAIN" 1) ; (getstring "\nClean0 Begin: Unload all xrefs") (C:XRU) ; (getstring "\nClean0 Begin: Thaw All") (c:ta) ; (getstring "\nClean0 Begin: Turn all on") (c:ON) ; (getstring "\nClean0 Begin: Make objects explodable") (c:explodable) ; (getstring "\nClean0 Begin: Burstall") (c:burstall) ; (getstring "\nClean0 Begin: ConstraintInfer set to 0") (command "CONSTRAINTINFER" "0") ; (getstring "\nClean0 Begin: Thaw all") (c:ta) ; (getstring "\nClean0 Begin: Turn all on") (c:on) ; (getstring "\nClean0 Begin: Zoom Ext") (c:ze) ; (getstring "\nClean0 Begin: Set Elev to 0") (C:ELEV0) ; (getstring "\nClean0 Begin: Select All") (c:ai_selall) ; (getstring "\nAll M Text to without Mask") (c:DeMask) ; (getstring "\nClean0 Begin: Change all Selected to Color by Layer") (c:ccby) ; (getstring "\nClean0 Begin: Create a group of points") (setq ss (ssget "_x" '((0 . "point")))) ; (getstring "\nClean0 Begin: Erase a group of points") (Command "erase" "p" "") ; (getstring "\nClean0 Begin: Create a group of wipeouts") (setq ss (ssget "_x" '((0 . "wipeout")))) ; (getstring "\nClean0 Begin: Erase a group of wipeouts") (Command "erase" "p" "") ; (getstring "\nClean0 Begin: Superpurge") (c:purge3x) ; (getstring "\nClean0 Begin: ZoomExt") (c:ze) ) Quote
BIGAL Posted June 7, 2018 Posted June 7, 2018 (edited) I use this layer delete it has the ability to do what you want look at these 2 new lines (setq lst (list "Outside" "inside" "left "right" "22")) (fx-rm-layer lst) del-layer.lspFetching info... Edited June 7, 2018 by BIGAL Quote
rlx Posted June 7, 2018 Posted June 7, 2018 only downside is you cant delete some layers when they've infested a block. In that case you'll have to use LAYMRG. 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.