Lisp to delete a code specified layer Frozen or Not

Lisp to delete a code specified layer Frozen or Not

timothy_crouse
Collaborator Collaborator
794 Views
2 Replies
Message 1 of 3

Lisp to delete a code specified layer Frozen or Not

timothy_crouse
Collaborator
Collaborator

Hello

 

Does anyone have a lisp that will delete a hard coded layer regardless of the layer state,

ON, OFF, FROZEN.

 

I guess it should set the current layer to layer 0 first

Delete the layer by name

Purge the drawing

 

I am looking for a lisp that works like this so I can include in a Hurrican Script.

 

Thanks in Advance

-Tim C.

 

0 Likes
Accepted solutions (1)
795 Views
2 Replies
Replies (2)
Message 2 of 3

Kent1Cooper
Consultant
Consultant
Accepted solution

(command

  "_.layer" "_unlock" "YourLayerName" "_set" "0" ""

  "_.laydel" "_name" "YourLayerName" "" "_yes"

)

 

No need to Purge afterwards [for the Layer, at least] -- LAYDEL takes care of that.

 

EDITED:  It doesn't matter whether the Layer is off or frozen, but it won't do it if it's locked, so I added unlocking it first, along with setting 0 current just in case as you said.

Kent Cooper, AIA
0 Likes
Message 3 of 3

timothy_crouse
Collaborator
Collaborator

Thank You for your help

0 Likes