Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Delete a layer...

7 REPLIES 7
Reply
Message 1 of 8
Anonymous
157 Views, 7 Replies

Delete a layer...

I've got some layers in my drawing that absolutely have nothing on them and they are not referenced by any blocks, but I cannot purge them out. Seems that sometimes when this has happened if I delete all of the viewports (even though the viewport is not on that layer) I can then purge out the layer(s). I have too many viewports in my current drawing to do this. Any ideas on how to get rid of these layers?
7 REPLIES 7
Message 2 of 8
BillZ
in reply to: Anonymous

Use:

(setq ss (ssget "X" (list (cons 8 "LayerName"))))

to check each layer to see if there is anything on them.
Could be a zero length text line or viewport.
Either change the ents in ss to another layer or delete them.

You could wblock the entire drawing out to another name and see if you can purge it and then replace the old drawing with it.

HTH

Bill
Message 3 of 8
Anonymous
in reply to: Anonymous

Is the layer frozen in one of the viewports? -- -Jason Member of the Autodesk Discussion Forum Moderator Program "tsigwing" wrote in message news:4470277.1077198478670.JavaMail.jive@jiveforum1.autodesk.com... > I've got some layers in my drawing that absolutely have nothing on them and they are not referenced by any blocks, but I cannot purge them out. Seems that sometimes when this has happened if I delete all of the viewports (even though the viewport is not on that layer) I can then purge out the layer(s). I have too many viewports in my current drawing to do this. Any ideas on how to get rid of these layers?
Message 4 of 8
Anonymous
in reply to: Anonymous

Yes.
Message 5 of 8
Anonymous
in reply to: Anonymous

Thaw that layer in all the viewports, then you should be able to purge (assuming there are no other items referencing the layer) -- -Jason Member of the Autodesk Discussion Forum Moderator Program "tsigwing" wrote in message news:21411792.1077201106215.JavaMail.jive@jiveforum1.autodesk.com... > Yes.
Message 6 of 8
Anonymous
in reply to: Anonymous

That got it. Is this because the vp holds the layer name in the extended data?
Message 7 of 8
Anonymous
in reply to: Anonymous

Yes. -- -Jason Member of the Autodesk Discussion Forum Moderator Program "tsigwing" wrote in message news:9248315.1077204383293.JavaMail.jive@jiveforum1.autodesk.com... > That got it. Is this because the vp holds the layer name in the extended data?
Message 8 of 8
Anonymous
in reply to: Anonymous

If you can not purge a layer that is not used, even in a block, than mostly it contains invisible objects. Invisible objects are for instance Text that contains spaces or Blocks that do not contain any objectst. You can not erase those objects because yo can not select them with a crossing or window. You can only select them with the option keyword ALL. Do the following: 1: Thaw, On and Unlock all layers. 2: Go to Model 3: Zoom All. 4: Activate ERASE. 5: Type in: ALL 6: De-select everything on your screen with a crossing (pressing ). 7: Press to end selection. 8: Repeat 3 - 7 in all layouts. 9: Try to purge your layer. JanC. "tsigwing" schreef in bericht news:4470277.1077198478670.JavaMail.jive@jiveforum1.autodesk.com... > I've got some layers in my drawing that absolutely have nothing on them and they are not referenced by any blocks, but I cannot purge them out. Seems that sometimes when this has happened if I delete all of the viewports (even though the viewport is not on that layer) I can then purge out the layer(s). I have too many viewports in my current drawing to do this. Any ideas on how to get rid of these layers?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost