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.
Thank you!
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;
}
I have one more question about the method of “RhinoDocument.Objects.Find()”. I tried to find this method in RhinoCommon API document. Unfortunately, I cannont find this method. Could you give me some tips where I can get the message about RhinoDocument class in c#.