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!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download

    SketchUp Command Calls

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    4 Posts 3 Posters 337 Views 3 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.
    • S Offline
      SYD_UK
      last edited by

      How would I put the EDIT pull down item SelectNone onto the Context menu?

      Also where can I find a reference list of default SketchUp command calls for use in Ruby Script files?

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jim
        last edited by

        Hi Syd,

        There is a list of "send_action" commands here, but I don't see a "select none".

        But, it's easy to manipulate the Selection using Ruby.

        Here's short example

        
        # select_none.rb - adds "select none" option to context menu.
        UI.add_context_menu_handler { |menu|
            menu.add_item("Select None") { Sketchup.active_model.selection.clear }
        }
        
        

        Hi

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          To add Context Menus: http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/ui.html#add_context_menu_handler

          For Sketchup commands: http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/sketchup.html#send_action

          Here's the Class index of the Sketchup Ruby API: http://code.google.com/intl/nb/apis/sketchup/docs/classes.html

          Thomas Thomassen — SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 Reply Last reply Reply Quote 0
          • S Offline
            SYD_UK
            last edited by

            Thanks guys - I've added the code:

            { Sketchup.active_model.selection.clear }

            to the existing ContextMenuMenus.rb file TIG supplied

            Kind Regards
            Syd

            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