Hi All
I’m new to Rhino development, so excuse me for any obvious questions…
I’m working with RhinoCommon c#.
I’m trying to create lines on a specific layer (not Default layer) from code. what should be done to assign a layer to object?
thanks…
public static Rhino.Commands.Result AddLine(Rhino.RhinoDoc doc, Rhino.Geometry.Point3d start, Rhino.Geometry.Point3d end )
{
Rhino.Geometry.Vector3d v = end - start;
if (v.IsTiny(Rhino.RhinoMath.ZeroTolerance))
return Rhino.Commands.Result.Nothing;
if (doc.Objects.AddLine(start, end) != Guid.Empty)
{
doc.Views.Redraw();
return Rhino.Commands.Result.Success;
}
return Rhino.Commands.Result.Failure;
}