C# script for baking to layers with name/color attributes

Hey guys,

I’ve written a C# script for baking meshes but would like to add an input for specifying the layer name, and layer color for the bake. How would I go about doing this?

hey!

I think you can do as below:

Rhino.RhinoDoc.ActiveDoc.Add(_yourgeometry);
Rhino.RhinoDoc.ActiveDoc.Layers.AddLayer(_yourlayer);
and then adding: _yourlayer.LayerColor(color);

Thanks!

1 Like