The way to have 2 rbz plugins when installed are in the same plugin menu is NAT (I HAVE FOUND A SOLUTION)

I am new to ruby. I want to manage individual plugins when installed, they are all in one plugin menu, so how do I code in those individual plugins? I hope everyone can help.

Your question, at least to me, is unclear. Can you please explain more?

Perhaps studying the following Sketchup Ruby API chapters will help:

Sketchup::Menu — SketchUp Ruby API Documentation
UI::Command — SketchUp Ruby API Documentation
UI::Toolbar — SketchUp Ruby API Documentation

For example, I have 2 rbz files as shown
Screenshot 2025-07-11 122733
When installing into sketchup in the plugin menu, it is not in one section, NAT_Studio, but it is separated into 2 sections, NAT_Studio.

1 Like

I don’t think it is possible :frowning: , see here:

Check if Sub Menu already exists - Developers / Ruby API - SketchUp Community

1 Like

… and further, this has been a long standing omission in the API. We have opened feature requests already for the ability to have better access to menus and submenus:

… and …

1 Like

image
Fredo and Curic somehow solved this issue

2 Likes

You can manage all your plugins under a single submenu by using a shared menu variable. For example:

module Curic
  def self.plugin_menu
    @plugin_menu ||= UI.menu('Plugins').add_submenu('Curic')
  end
end

Then, in each individual plugin, I add menu items like this:

measurepp_menu = Curic.plugin_menu.add_submenu('Measure++') 

This way, all of your plugins will appear under one submenu called “Curic” in the Plugins (Extensions) menu.

5 Likes

This did not always work. Do you have a reference for when it was fixed? (I thought @tt_su was looking into it.)

Fredo uses a loader that loads all of his extensions so that the submenu reference stays valid.

1 Like