Entity to current layer LISP?

Discussion in 'AutoCAD' started by ~Jeff~, Jan 15, 2004.

  1. ~Jeff~

    ~Jeff~ Guest

    I was looking for a LISP routine that would change entities that I pick
    (multiple or one) on the drawing to the current layer and it would change
    the color and linetype to BYLAYER. Anyone have a LISP that does this or know
    the code to make this happen?

    Thanks in advance!
     
    ~Jeff~, Jan 15, 2004
    #1
  2. ~Jeff~

    Paul Turvill Guest

    (defun C:MyProp (/ ss)
    (setq ss (ssget))
    (command "_.chprop" ss "" "_la" (getvar "clayer") "_c" "BYLAYER" "_lt"
    "BYLAYER" "")
    (princ)
    );;

    .... and of course, there are also the PROPERTIES and MATCHPROP commands ...
    ___
     
    Paul Turvill, Jan 15, 2004
    #2
  3. ~Jeff~

    Rudy Tovar Guest

    Simple.

    (defun c:cyr (/ obj)

    (setq obj (ssget))

    (if obj (command "change" obj "" "p" "la" (getvar"clayer") "c" "bylayer"
    "lt" "bylayer" ""

    (princ)))

    (princ)

    )
     
    Rudy Tovar, Jan 15, 2004
    #3
  4. ~Jeff~

    Rudy Tovar Guest

    Scary when two people think the same.. uuooo..........
     
    Rudy Tovar, Jan 15, 2004
    #4
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.