I have this simple lisp that I use everyday to change an objects layer color by selecting the object. My question is: How could this be modified to get the entity's nested xref layer.
(defun C:CLC (/ lay colr)
(setvar "cmdecho" 0)
(setq lay (cdr (assoc 8
(entget (car (entsel "\nSelect entity to specify layer for color: "))))))
(setq colr (getstring "\nEnter desired color: "))
(command "-layer" "c" colr lay "" )
(princ)
)
(setfunhelp "c:clc" "acadtools.chm" "clc")
Thanks,
Ron