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 } endHow 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 } endChris
-
Thanks, Chris. Now I don't feel too bad about not being able to find it in the API.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement