How to create a Rhino active menu

Rhino menu.jpg

Is there a c++ SDK function used to creat a active rhino menu just like this?

What I’ve done in the past is actually insert geometry into the scene where I expect people to click. I override the ShortName function to determine what shows in the list. You can also have it not draw the geometry unless highlighted, if that’s helpful.

You might also want to look at RhinoChooseOneObject

1 Like


I see the RhinoChooseOneObject function.
but don’t know how to use it.
can you give me some examples.?
thanks again

The RhinoChooseOneObject() function is used by a CRhinoGetObject object picker when it determines that the user has picked on more than object. So in most cases, there is no reason to call this function on your own, as other SDK tools call this on your behalf.

The RhinoChooseOneObject() function is well documented in rhinoSdkGetObject.h. What issue with it are you having? What are you trying to do and why?


– Dale

thanks for you answer.
I think maybe RhinoChooseOneObject function is not my need.
I just want to chose the edge of surface,but one edge maybe belong to many surface.
so I need a pop menu to chose which surface the edge belongs to
just like the screenshots I provided in the first article of the topic.

CRhinoGetObject will do this for you automatically.

but I have’t saw CRhinoGetObject do this for me automatically.
I think maybe I should set some params?
but I don’t konw which params I should set ?

How about this:

CRhinoGetObject get;
get.SetCommandPrompt( L"Select edge" );
get.SetGeometryFilter( CRhinoGetObject::curve_object );
get.SetGeometryAttributeFilter( CRhinoGetObject::edge_curve );
CRhinoGet::result res = get.GetObjects( 1, 1 );

my codes are just like you provided.
but when the edge selected belongs to two faces,
the select menu still does’t not appear.