Lisp needed

Hi I'm looking for lisp that lock all layer except the picked entity, next unlock layers back. thanks

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
express tools has a similar option. go to layer manager & lock all, then pick on the entity you which to unlock the layer of.
"jazu" <nospam> wrote in message

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
this is the way im doing, so I want faster metod

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
This will do what you want. Use layerp to return layers to their previous state.
(defun c:layerlock ( / ename layname) (while (not (setq ename (entsel "\nSelect object on desired layer: ")))) (setq ename (car ename)) (setq layname (cdr (assoc 8 (entget ename)))) (command ".layer" "s" layname "lo" "*" "U" layname "") (princ (strcat "\nAll layers locked except " layname)) (princ) )
"jazu" <nospam> wrote in message

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
thanks Is it possible unlocking some layers by picking them? Say I have some layers. Using ur lisp I lock all except one. Next I want to unlock just one layer by picking it. jazu

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
There is a Bonus/Express tool to do this, which you may have. Used to be
"LAYULK"
--


MichaelB
www.michaelbulatovich.ca
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Basically the same thing.
(defun c:layerunlock ( / ename layname) (while (not (setq ename (entsel "\nSelect object on desired layer: ")))) (setq ename (car ename)) (setq layname (cdr (assoc 8 (entget ename)))) (command ".layer" "u" layname "") (princ (strcat "\nLayer " layname " is unlocked")) (princ) )
"jazu" <nospam> wrote in message

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.