💡 LightUp 7.1 | SketchUp's only real-time renderer that uses object-based rendering
Download Trial
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