Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Anonymous
500 Vistas, 4 Respuestas

Display color number of the layer of a selected object

Is there a way to display the color number of the layer of a selected objected? Maybe a lisp routine?

rkmcswain
en respuesta a: Anonymous

What would you want it to display if the object has a color assigned to it, IOW, not "Bylayer"?

 

This might help: https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/get-layer-name-and-colour-from-selec...

R.K. McSwain     | CADpanacea | on twitter
Anonymous
en respuesta a: rkmcswain

I would want it to display the color of the layer of the object selected so that I can check what color that layer is currently on.

 

Basically, instead of using "xlist" to check what layer is on and then checking the layer in layer manager to check the color. It would save some time and be useful in some cases.

Kent1Cooper
en respuesta a: Anonymous

(cdr (assoc 62 (tblsearch "layer" (cdr (assoc 8 (entget (car (entsel "\nSelect object to find its Layer's color: "))))))))

Kent Cooper, AIA
Anonymous
en respuesta a: Kent1Cooper

Thank you so much. This worked like a charm!