Get all command buttons / Toolbar items

Hi,

I want to explore a different interpretation of interface and for that I need to replace the current toolbar model with my own. The first thing I need is to take all the buttons installed and know all the information they have (id, name, icon, command id, toolbar/group container, etc), to be able to display them in my way. Is this possible?

I can read toolbars and groups using RhinoApp.ToolbarFiles, but surprisingly it doesn’t support items/buttons. I can also by reflection know all the commands but it returns much less than expected (I guess only the plugin commands). Rhino_DotNet.dll has the MRhinoMenuItem class but I don’t see how to access all the buttons that do not come from plugins nor how to retrieve the icons.

Do I have any chance to do it? If not, could you include in RhinoCommon in RhinoApp.ToolbarFiles access to its buttons please?

@JohnM - is this something you can help with?

RUI Files are merely XML files containing several sections with definitions of different UI items. You can parse the <tool_bar_group, <tool_bars> and sections to extract the information you are looking for.

The code used to read/write and create the toolbars is located in the Toolbars.rhp plug-in (Assembly) and has not been publicly exposed.

1 Like