Hi,
in my command, I’m asking users to select existing objects from the scene. The selection order is important, so rather than using GetObject.GetMultiple()
, I’d like to stack a few GetObject()
calls.
The first one works without issues, the second doesn’t trigger, though.
protected override Result RunCommand(RhinoDoc doc, RunMode mode)
{
Point3d startPoint;
using (GetObject go = new GetObject())
{
go.SetCommandPrompt("Select start point");
if (go.Get() != GetResult.Object)
{
RhinoApp.WriteLine("No start point was selected.");
return go.CommandResult();
}
startPoint = go.Object(0).Point().Location;
}
Point3d endPoint;
using (GetObject go = new GetObject())
{
go.SetCommandPrompt("Select end point");
if (go.Get() != GetResult.Object)
{
RhinoApp.WriteLine("No end point was selected.");
return go.CommandResult();
}
endPoint = go.Object(0).Point().Location;
}
doc.Views.Redraw();
return Result.Success;
}
Enabling go.OneByOnePostSelect = true;
on the second call forces the input prompt, but disables window selection and users now need to click the objects individually.
What am I missing?