sketchucation logo sketchucation
    • Login
    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

    Editing SU menu

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 225 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • honoluludesktopH Offline
      honoluludesktop
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • Chris FullmerC Offline
        Chris Fullmer
        last edited by

        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

        Lately you've been tan, suspicious for the winter.
        All my Plugins I've written

        1 Reply Last reply Reply Quote 0
        • honoluludesktopH Offline
          honoluludesktop
          last edited by

          Thanks, Chris. Now I don't feel too bad about not being able to find it in the API.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement