• Login
sketchucation logo sketchucation
  • Login
โš ๏ธ Libfredo 15.4b | Minor release with bugfixes and improvements Update

Example Ruby

Scheduled Pinned Locked Moved Developers' Forum
4 Posts 2 Posters 295 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.
  • C Offline
    CadFather
    last edited by 26 Oct 2008, 15:54

    would any kind master give me a script code example of something basic like the pushpull or move tool?

    i would like to create a custom toolbar with my favourites - Thanks.

    1 Reply Last reply Reply Quote 0
    • M Offline
      Matt666
      last edited by 26 Oct 2008, 16:09

      Hi cadFather !
      Native Su tools are NOT basic! It's hard to create completely re-create them in Ruby..

      However, you can start them via a send_action function !

      Like this :

      Sketchup.send_action "selectPushPullTool;"
      

      This is the code you will put in your icon code...

      cmd = UI;;Command.new("Push pull") { Sketchup.send_action "selectPushPullTool;" }
      cmd.small_icon = 'nameOfYourIcon'
      cmd.large_icon = 'nameOfYourIcon'
      cmd.tooltip = cmd.status_bar_text = "Push-Pull"
      tb.add_item(cmd)
      

      Frenglish at its best !
      My scripts

      1 Reply Last reply Reply Quote 0
      • C Offline
        CadFather
        last edited by 26 Oct 2008, 16:32

        Thanks Matt, will put your help to good use with a basic toolbar - if i can! ๐Ÿ˜‰ ๐Ÿ˜„

        1 Reply Last reply Reply Quote 0
        • M Offline
          Matt666
          last edited by 26 Oct 2008, 17:02

          Yes you can ! And we're here to help you ! ๐Ÿ˜‰

          Frenglish at its best !
          My scripts

          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