Lock all but selected layer

Discussion in 'AutoCAD' started by scatman99, Jan 26, 2005.

  1. scatman99

    scatman99 Guest

    Does anyone have a lisp that will, when an object is selected lock all the layers except the one layer that the object is on.
    Any ideas would be greatly appreciated.
     
    scatman99, Jan 26, 2005
    #1
  2. scatman99

    Matt W Guest

    Try this one on for size.
    This is a modified version of GPETTY46's routine from yesterday that would
    freeze everything except for the selected layer(s).
    I modified it to lock every layer except for the selected one(s).

    HTH
     
    Matt W, Jan 26, 2005
    #2
  3. scatman99

    Jimmy D Guest

    Hi scatman,

    here's one idea:

    (setq ObjLayer (cdr (assoc 8(entget (car (entsel))))))
    (command "-layer" "lock" "*" "unlock" ObjLayer "")

    Jimmy
     
    Jimmy D, Jan 26, 2005
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.