I used RhinoApp.RunScript () to call the T-splines of the tsConvert command that has been unsuccessful
my code:
protected override Result RunCommand(RhinoDoc doc, RunMode mode)
{
ObjRef rhinoMesh_objRef;
using (GetObject getObjects = new GetObject())
{
getObjects.SetCommandPrompt("选择要转化成TS的网格");
getObjects.SubObjectSelect = true;
getObjects.GroupSelect = false;
getObjects.GeometryFilter = ObjectType.Mesh;
getObjects.AcceptNothing(true);
if (getObjects.GetMultiple(1, 0) != GetResult.Object)
{
RhinoApp.WriteLine("选择不成功");
return getObjects.CommandResult();
}
rhinoMesh_objRef = getObjects.Object(0);
getObjects.Dispose();
}
bool bo = RhinoApp.RunScript("_tsConvert " + "_SelID " + rhinoMesh_objRef.ObjectId.ToString() + " _Enter", true);
RhinoApp.WriteLine(bo.ToString());
doc.Views.Redraw();
return Result.Success;
}
I can use Grasshopper to call the T-Splines tsConvert command
I do not know why VS has been calling unsuccessful,Anyone have any better suggestions?
Thanks
——NARUTO