I need to enable 2 objects to be selected by the user. the first selected object to remain highlighted and the 2nd selected object to have the gumball enabled but not the first.
As I was experimenting to implement this the objects being selected are being unselected after exiting my code below.
could anyone advice me what is wrong in my code please?
public static Result getFirstAndSecondMembers(out RhinoObject first, out RhinoObject second)
{
first = second = null;
var go = new GetObject();
go.GeometryFilter = ObjectType.Extrusion;
go.SetCommandPrompt("Select first and the second members");
go.GetMultiple(2, -1);
if (go.CommandResult() != Result.Success) return go.CommandResult();
go.GroupSelect = true;
go.SubObjectSelect = false;
go.EnableClearObjectsOnEntry(false);
go.EnableUnselectObjectsOnExit(false);
go.DeselectAllBeforePostSelect = false;
var sobs = go.Objects();
first = sobs[0].Object();
second = sobs[1].Object();
return Result.Success;
}
No worried, I hope my response did not make you feel like a newbie. Everyone has a learning curve I only learned the gumball enable/disable a few months ago.
just tried your code, thanks, it works but the gumball covers both the selected object
i only want the 2nd to be associated with the GB but it looks like thats how gumball was set to work that is to cover everything in the selection list but there must be a workaround for it?