Get Viewport and ConstructionPlane of Object Selection



Dear Everybody
i know there is simple workarounds. But maybe i just missed something that already exists and save me some work:

Rhino.DocObjects.ObjRef has some Information about how Objects where Picked.
ObjRef also has a constructor with PickContext - and PickContext has a Viewport-Information.

Assuming i let the user Pick multiple Objects - is there any method or property, that gives me the Information about each ViewPort ( and it s Construction Plane ) in which the picking occured ?
This might be different for each Object as the user can switch Viewports while Picking.

thanks for a fast “yes -> here” / or “no sorry”

And by the way - why are there those two different enums ?

have a good start into the week - kind regards from sunny summer zurich - Tom

(Menno Deij - van Rijswijk) #2

If you use GetObject you can access the GetObject.View() function after each object has been selected. From that, you can get the viewport.


dear Menno - thanks a lot for the fast reply.
But still i have to do a simple one Object at the time Get
If i use GetMultiple
the user has the nice chance of selecting and deselecting - but i will loose track of wich view / plane belongs to which object - especially if user deselcts…
or did i still miss something ?
thanks / best Tom

(Menno Deij - van Rijswijk) #4

Yes, I think you are right. It is not possible to track viewports in a multi-select action.