Build popup menu items with c# on Rhino 5.0


#1

On Rhino 5.0 help, it show that there is a Workspace editor (on the Rhino Options > Toolbars > Tools menu, click Workspace Editor) which provide C# code ( click menu item > plug-in properties > generate C# codes ) for system designer to build up a popup menu item on menu bar. However, most of showed functions, such as Rhino.UI.MRuiUpdateUi.ResisterMenuItem(), are not offered in the Rhino namespace on RhinoCommon SDK (Rhino 5 SR1).

How would I build and remove menu items on menu bar on Rhino 5.0 with given RhinoCommon SDK with C# language?


(Dale Fugier) #2

@johnm, can you chime in here?


(John Morse) #3

The C# code generated by the editor refers to classes provided by RhinoDotNET and not Rhino Common. That being said, the classes are in RhinoDotNET but do not seem to be publicly exported which is a bug in the RhinoDotNET SDK. The code you were referencing is useful for enabling/disabling RUI provided menu items but not for adding or removing items. If you want to dynamically create and modify menus please see this WIKI article: http://wiki.mcneel.com/developer/addcustommenu


#4

Hi JohnM, the WIKI article: http://wiki.mcneel.com/developer/addcustommenu show the creation of menu items by the using of .NET class, RMA.UI.MRhinoPlugInMenu. However, this class is not offered on RhinoCommon SDK. Is there any method to do it with RhinoCommon SDK?


#5

Hi JohnM,
The WIKI article: http://wiki.mcneel.com/developer/addcustommenu show the creation of menu items by the using of .NET class, RMA.UI.MRhinoPlugInMenu. However, this class is not offered on RhinoCommon SDK. Is there any method to do it with RhinoCommon SDK?


(John Morse) #6

There is currently no way to add menus using the Rhino Common SDK.