The "Cannot use these objects. Removing them from selection. occurs when you’ve picked more objects than the picker allowed. In the case of your code above, you’ve allowed for group selection but you are only picking a single object.
If you want to pick a single object that belongs to some group, then you can us a custom GetObject class.
public class GetGroupObject : Rhino.Input.Custom.GetObject
public override bool CustomGeometryFilter(
if (null != rhObject)
if (rhObject.Attributes.GroupCount > 0)
I’d like to pick the whole group of objects not single obj from the group - i had code earlier which was picking one obj - also one from group, but now i see that user will need to pick one object which fits in geometry filter or group which consist of objects that are fitting geometry filter.
I hoped that simple Rhino.Input.Custom.GetObject go = new Rhino.Input.Custom.GetObject(); will be enough for this. Is custom class which inherits from Rhino.Input.Custom.GetObject the only way in this case?
[Edit] Oh i didn’t realized that GetMultiple is last method which i should call. Earlier i had:
Now it works. Theres only one question more is there any possibility to know if user already picked one group and end command of picking? Now user can pick multiple objects and multiple groups i’d like to end command if user will pick one object or one group without possibility to pick next objects or groups.
The same info in meta showed me next issue which is drag selection Any idea to prevent window pick, crossing pick, or Sel* command during GetObjects ? As i supose OneByOnePostSelect wont help here?
go.OneByOnePostSelect = true; //without enabling post selection dont allow to pick with window selection
go.EnableTransparentCommands(false); //solved command problem