Author Topic: layer color  (Read 1612 times)

0 Members and 1 Guest are viewing this topic.

MeasureUp

  • Bull Frog
  • Posts: 462
layer color
« 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.

MeasureUp

  • Bull Frog
  • Posts: 462
Re: layer color
« Reply #1 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")))

ronjonp

  • Needs a day job
  • Posts: 7529
Re: layer color
« Reply #2 on: February 11, 2011, 12:40:58 PM »
Or this:
(vla-get-color (vlax-ename->vla-object (tblobjname "LAYER" "0")))

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC