Hi
I am creating new layers with different colors and then i put objects on them. When i programed this a few months ago it worked fine, objects were displayed with separate colors. However, recently the layer colors only show in print-display mode?
Here i create the layer:
then i create an object and attributes:Code:layer_index0 = scriptcontext.doc.Layers.Add(__ts()+'_name', System.Drawing.Color.FromArgb(255,0,0))
What am i doing wrong?Code:line = Rhino.Geometry.Line(p0,pt1) attr = Rhino.DocObjects.ObjectAttributes() attr.ColorSource = Rhino.DocObjects.ObjectColorSource.ColorFromObject attr.LayerIndex = layer_index0 scriptcontext.doc.Objects.AddLine(line, attr)
Best, Nick


Reply With Quote