• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

SketchUp Command Calls

Scheduled Pinned Locked Moved SketchUp Discussions
sketchup
4 Posts 3 Posters 324 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 2 Dec 2009, 13:53

    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 2 Dec 2009, 13:59

      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
      • T Offline
        thomthom
        last edited by 2 Dec 2009, 14:00

        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 2 Dec 2009, 14:22

          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
          1 / 1
          • First post
            1/4
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement