I want to get the layer message of curve through c# code as following. But there is a problem that the “Rhino.Geometry.Curve” type cannot implicitly be converted to “Rhino.DocObjects.CurveObject”.
Please give me some suggestions. Any help is appreciated.
private void RunScript(List x, ref object A)
Rhino.DocObjects.CurveObject rhobj = x[i];
int index = rhobj.Attributes.LayerIndex;
string name = doc.Layers[index].Name;