Change layer color script

not sure if that’s possible.I want to write a little macro script to change the layer color.
for example,here is little script

-_ChangeLayer pause newlayer newname

it will create a new layer with black color.I want to change the color of the new layer using the macro script instead of black color layer.would it be possible??

Do you always want the same color for a new layer? If so, you can simply go to Rhino Options > Appearance > Colors > New Layer and change black to something else.

that’s not quite what I want.I want to change the color of specific layer with specific color using macro script.
perhaps I will explain more detail what I want to archieve.
I am trying to create two buttons to create a cutting plane in 45 degree and 30 degree angle.
below is the 45 degree cutter . I still can’t figure 30 degree cutter yet.

_CutPlane pause -5,-5,0 0,0,0  -5,5,0 0,0,0 enter 
-_ChangeLayer _sellast enter n 45cutter 

after that I want to change the color of 45cutter layer into specific color that I want.

Something like this should work:
! _CutPlane _Pause -5,-5,0 0,0,0 -5,5,0 0,0,0 _Enter -_ChangeLayer _Sellast _Enter _New "45cutter" _-Layer _Color "45cutter" 255,0,0 _Enter

For the 30° cutter you might look into specifying the coordinates in polar coordinates rather than Cartesian (see the Help on how to do this)


cool.I figured out something like this

_CutPlane pause 0 1<90 0 1<60 0 1<30 0 1<0 0 1<-30 0 1<-60

thanks you for help.