Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
Adding Item To Sub-Menu?
-
I have a sub menu that contains my W.I.P plugins. I have trouble adding items to it. I can't find the code that does it in the API Index. How do I do this?
-
http://code.google.com/apis/sketchup/docs/ourdoc/menu.html#add_submenu
plugins_menu = UI.menu("Plugins") submenu = plugins_menu.add_submenu("Test") submenu.add_item("Plugin Name") { plugin_method }That should do the trick.
It gets a little trickier if you want to multiple different plugins to the same sub-menu, but its possible. I use a global variable, but Jim showed me a way to do it without the global.
Chris
Advertisement