@david. said:
Yes, I realized that. I thought there might be a way through the SU UI similar to accessing toolbars that have been created. Apparently, not. Not a big issue.
Actually the API lacks a Toolbars collection, which we have wanted. Now with the name method (just added, we can create one, 'on the fly'.)
module SuchandSuch
Toolbars={}
ObjectSpace.each_object(UI;;Toolbar) {|tb|
Toolbars[tb.name]=tb
}
end
You refer to the just added method each which accesses the buttons ( UI::Command objects,) on a given toolbar.
But ... the Sketchup::Menu class has not yet been updated with Enumerable methods (which should include each_item and each_submenu iterator methods;) nor any name, parent, etc getter methods.
We'll have to cross our fingers for the next MR.