lisp routine to turn off layer by pick element

Discussion in 'AutoCAD' started by Sprocket, Dec 17, 2004.

  1. Sprocket

    Sprocket Guest

    Is there a lisp out there that I could turn off a layer just by picking
    an element. How about one the would freeze a layer by picking an element
     
    Sprocket, Dec 17, 2004
    #1
  2. Sprocket

    Paul Turvill Guest

    Express Tools: LAYFRZ
    ___
     
    Paul Turvill, Dec 17, 2004
    #2
  3. That'll FREEZE it Paul. Try this:

    (defun c:layoff (/ a2 b2 l1 l2)
    (setvar "CMDECHO" 0)
    (prompt "Select entity on target layer") (terpri)
    (setq a2 (entsel))
    (setq b2 (entget (car a2)))
    (setq l1 (assoc 8 b2))
    (setq l2 (cdr l1))
    (command "layer" "of" l2"")
    (princ)
    )
     
    Michael Bulatovich, Dec 18, 2004
    #3
  4. Sprocket

    Paul Turvill Guest

    That was the OP's second question.
    ___
     
    Paul Turvill, Dec 18, 2004
    #4
  5. You're right. Missed that.

     
    Michael Bulatovich, Dec 18, 2004
    #5
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.