Jump to content

Recommended Posts

Posted

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)

)

Posted (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 by BIGAL
Posted

only downside is you cant delete some layers when they've infested a block. In that case you'll have to use LAYMRG.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...