Colors for Live Layers

Discussion in 'AutoCAD' started by RichardG, Jan 31, 2005.

  1. RichardG

    RichardG Guest

    So far I have:
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    (defun construct_layer_list ( / temp-list temp )
    (setq temp-list nil)
    (setq temp (tblnext "layer" T))
    (while temp
    (if (not (wcmatch (cdr (assoc 2 temp)) "*|*"))
    (setq temp-list (cons (cdr (assoc 2 temp)) temp-list))
    )
    (setq temp (tblnext "layer"))
    )
    (if temp-list (acad_strlsort temp-list))
    )
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    What i need is some hints to acomplish that part of the function which will
    take all of those layers that are not Xref layers and change the property
    value to a specific color lets say 10.
    Any help is appreciated thanks
    Richard
     
    RichardG, Jan 31, 2005
    #1
  2. RichardG

    Doug Broad Guest

    To convert all non-xref layers to color 10:

    (command "_.layer" "_c" "10" "~*|*" "")

    Of course, that alone will not guarantee that xref layers are also not color 10.
     
    Doug Broad, Jan 31, 2005
    #2
  3. RichardG

    T.Willey Guest

    (foreach item temp-list
    (command "_.layer" "c" 10 item "" "" "")
    )

    I'm sure there is a better way, but this will work.
    Tim
     
    T.Willey, Jan 31, 2005
    #3
  4. RichardG

    RichardG Guest

    Thanks gentlemen
     
    RichardG, Jan 31, 2005
    #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.