TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: MeasureUp on February 10, 2011, 09:18:33 PM

Title: layer color
Post by: MeasureUp on February 10, 2011, 09:18:33 PM
How to get a layer's color?
For example, there is a layer "Stair" and its color is "white".
I know the layer color group code is "62".
BTW, I don't want to select an entity then get the layer's color.
Thanks for your help.
Title: Re: layer color
Post by: MeasureUp on February 10, 2011, 10:27:31 PM
Don't worry.
I am so low because I didn't have any drink today.
Code: [Select]
(cdr (assoc '62 (tblsearch "LAYER" "Stair")))
Title: Re: layer color
Post by: ronjonp on February 11, 2011, 12:40:58 PM
Or this:
(vla-get-color (vlax-ename->vla-object (tblobjname "LAYER" "0")))