Using GetOneObject two times, the second times didn't work

Hi,
I want to select 2 curves, and I wrote:

        ObjRef basicCrvObj;
        Result result = Rhino.Input.RhinoGet.GetOneObject(
            "Please select basic curve on CPlane:",
            false,
            ObjectType.Curve,
            out basicCrvObj);
        if (result != Result.Success)
        {
            RhUtil.RhinoApp().Print("Nothing to select. Cancel!");
            return Result.Failure;
        }
       ObjRef normalCrvObj;
       result = Rhino.Input.RhinoGet.GetOneObject(
            "Please select normal curve on CPlane:",
            false,
            ObjectType.Curve,
            out normalCrvObj);
        if (result != Result.Success)
        {
            RhUtil.RhinoApp().Print("Nothing to select. Cancel!");
            return Result.Failure;
        }

Rhino allowed me to select basicCrvObj by mouse at the first time I call GetOneObject command. But Rhino didn’t allow me to select normalCrvObj by mouse at the second time; although at the second command result = “Result.Success”.
Please help me to select the second curve!

That is because the 2nd time a curve is already selected (your first curve).

Put doc.objects.unselectall in between :smile:

1 Like

Thank you very much!

I’ve tried to do your way and it was good!