No. The API does not expose this feature. (If it did, there would be too many top level menus.)
Probably best to put them under a custom submenu beneath the “Tools” menu.
Because the UI::menu
module method returns a Sketchup::Menu
class instance object.
The #add_submenu
instance method is called upon one of these menu instances to add a submenu.
(They are not functions, because in Ruby a function is a specific global method that does type conversion and has the name of a class to convert to. Most coders do not use them and instead use instance methods that begin with the suffix "to_"
.)
I understand that you wish to add a top level menu, but this is not exposed for good reason. But if it were, it would be likely an application UX level method so most likely a dedicated UI
module method like "#add_topmenu"
(or similar.) It would also return a newly instanced Sketchup::Menu
class instance object.
The only thing you can do is create a submenu and perhaps also a toolbar. A toolbar allows a single click on a button. The submenu items allow the end user to create keychord shortcuts to your tools (regardless of nesting level.)
Otherwise, you can open a API request in the official tracker.
Issues · SketchUp/api-issue-tracker · GitHub