Jump to content

Delete layers that wont delete


seashell2day

Recommended Posts

How do i delete layers in autocad 2009 when the sign comes up that the layers are being used when they are clearly not. How can i find out what is holding onto my layer & stopping it from going? I use quick select to select everything on the layer i want to delete. It selects nothing because there is nothing on the layer i want to delete. It's not the current layer, not the 0 layer & it's not used by any xref. how do i delete it?

Link to comment
Share on other sites

Could be that a block attribute is on that layer.

 

Does 2009 have the Express Tools "laydel" command? Draw an object on the layer to be deleted, run "laydel", select that object...or so I heard explained better at this site recently.

Link to comment
Share on other sites

Could be that a block attribute is on that layer.

 

Does 2009 have the Express Tools "laydel" command? Draw an object on the layer to be deleted, run "laydel", select that object...or so I heard explained better at this site recently.

 

Not sure if laydel is actually mainstream now on '09 - I heard that laymrg is mainstream, so maybe laydel is also. :)

Link to comment
Share on other sites

AutoCAD 2009:

 

Menu Browser > Format > Layer Tools > Layer Delete.

 

If all else fails you can WBlock out everything you can see in the drawing then start a new drawing and insert what you have. Check to see if the problem layers still exist.

Link to comment
Share on other sites

For MEP 2008 the Laydel is a fully functional command, so my guess is it should be in Acad 2009. Just draw a line on the layer you want to delete type in "laydel" and select the line, or you can just type in "laydel" and hit "n" for name and a dialog box should pop up with all the current layers. Just select the one you want gone and it will delete the layer and all of the contents on that layer.

Link to comment
Share on other sites

You can use this to check block entities on layers:

 

; Get All on Layer by Lee McDonnell

; Args:-  layer (string)

(defun get_all_on_layer (layer / ss eLst blks att aBlst ents eBlst)  
 (if (tblsearch "LAYER" layer)
   (progn
     (setq eBlst (strcat "Entities within Blocks on Layer " layer ": \n\n"))
     (foreach x (blk_list)
   (setq ents (entnext (tblobjname "BLOCK" x)))
   (while ents
     (if (eq layer (cdr (assoc 8 (entget ents))))
       (setq eBlst (strcat eBlst (cdr (assoc 0 (entget ents))) " Within Block: " x "\n")))
     (setq ents (entnext ents))))
     (alert eBlst))
   (princ "\n<!> Layer Not Found in Drawing <!>"))
 (princ))


(defun blk_list (/ bLst)
 (vlax-for blk
       (vla-get-blocks
         (vla-get-activedocument
       (vlax-get-acad-object)))
   (setq bLst (cons (vla-get-name blk) bLst)))
 (setq bLst (vl-remove-if
          (function
        (lambda (x) (or (wcmatch x "*PAPER*") (wcmatch x "*MODEL*")))) bLst))
 bLst)

     
(defun c:test ()
 (get_all_on_layer (getstring "\nSpecify Layer: "))
 (princ))


Link to comment
Share on other sites

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...