Make an object a layer

I am generating objects via Rhinoscript, How can an make each object a layer, having its layer name and color.

Done. Thanks.
I did the following;

#create object

you can also modify object layer after creating it, like this:

obj = rs.AddPoint(0,0,0)
rs.AddLayer("layerName", rs.CreateColor(255,0,0))
rs.ObjectLayer(obj, "layerName")


For info, you mean using Python (rhinoscriptsyntax). RhinoScript is a different thing, using VBScript. Python is much better :slight_smile:

Thanks for the correction. I am a newbie

Thanks, this seems nicer.