#--- Make Layers ---
#https://discourse.mcneel.com/t/creating-sublayers-with-python/55948/2
#https://developer.rhino3d.com/samples/rhinocommon/add-layer/
import rhinoscriptsyntax as rs
def TestAddSubLayers():
parent_layer="MainLayer"
if not rs.IsLayer(parent_layer): rs.AddLayer(parent_layer)
sublayernames = ["Layer1", "Layer2", "Layer3"]
Colors = [(255,0,0), (0,255,0), (0,255,255)]
for i in range(len(sublayernames)):
# Color is also directly specifiable
rs.AddLayer(sublayernames[i],color=Colors[i],parent=parent_layer)
TestAddSubLayers()
#--- Make Layers End ---