🏢 PlaceMaker | 25% off for February including new Google Earth data imports!
Learn more
Editing SU menu
-
The following places "Export to DRW" in the SU "File" pull down menu after the print section:
if( not file_loaded?("skp2drw.rb") ) add_separator_to_menu("File") UI.menu("File").add_item("Export to DRW") { drw_export_3dface_file } end
How do I place it in the third section of the menu as a sub menu from "Export"? I am a SU ruby neophyte, and am still unable to find my way in the API.
-
I don't think that you can put a sub-menu in an existing submenu. I don't even think you can add any item to a native SU submenu. The best you can do is create a second "Export" submenu. Maybe name it "DRW Export > Export" (that is a submenu of DRW Export and a submenu item of "Export"). I'll show how to do that:
if !file_loaded?(__FILE__) plugins_menu = UI.menu("File") submenu = plugins_menu.add_submenu("DRW Export") submenu.add_item("Export"){ drw_export_3dface_file } end
Chris
-
Thanks, Chris. Now I don't feel too bad about not being able to find it in the API.
Advertisement