Looking for routine to change xref layer colors globally

Discussion in 'AutoCAD' started by Gary Ponting, Apr 30, 2005.

  1. Gary Ponting

    Gary Ponting Guest

    I am looking for a lisp routine that will allow me to change the
    color's of all my xref layers (ie. our xrefs are used as a screened
    background).

    I did some digging around and found the following routine with a
    search on Google groups that will take one layer and let you assign a
    new color to it.

    I am looking for some help on how to modify the following lisp to
    either work with a multiple selection (filtering out non xref layers)
    or without any selection at all (grabbing all xref layer names).

    Thanks in advance!
    Gary P.


    Credit to "Alex Januszkiewicz"

    (defun c:xcol(/ e col lay edb)
    (setq e(car(nentsel)))
    (if e
    (progn
    (initget 7)
    (setq col (getint "\nColor number :"))
    (setq edb (entget e))
    (setq lay (cdr (assoc 8 edb)))
    (princ (strcat "\nLayer: " lay))
    (setvar "cmdecho" 0)
    (command"_.layer""_col" col lay "")
    (setvar "cmdecho" 1)
    )
    )
    (princ)
    )
     
    Gary Ponting, Apr 30, 2005
    #1
  2. Gary Ponting

    Jeff Guest

    Jeff, May 4, 2005
    #2
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.