Restricting selection to pointCloud

Hello,

I would like to prompt the user to pick a set of points. At the same time however, the set to choose from should be part of a pre-selected pointCloud.

Inside the GetObject() or the GetPoint() methods, the GeometryFilter attributes allows the restriction to all point objects.
However this includes all point objects in the document, independent of them being in a cloud or not.
Is there a way of restricting this to the points belonging to a given cloud?

Inside my Rhino document I might have many points in exactly the same location. When clicking in one location, the user has to choose from a long list in the pop-up. Instead, I want the command to ignore all points not part of the point cloud.

Something like:

Rhino.Input.Custom.GetObject go = new Rhino.Input.Custom.GetObject();
go.SubObjectSelect = true;
go.GeometryFilter = ObjectType.Point;
go.DisablePreSelect();
go.DeselectAllBeforePostSelect = true;
go.RestrictSelectionToParentObjectWithId = “0000-0000-0000-0000-0000-0000” //here specify Guid of parent object.
go.Get()

Many thanks for any pointers!

Daniel

as a workaround it’s possible to lock all other objects in the document while making the selection.
However this requires checking the mode of all objects, and restoruing this mode at the end of the command.

See if this example is helpful.

https://github.com/dalefugier/SampleCsCommands/blob/master/SampleCsPointCloudPoints.cs