sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    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.
    • CadFatherC Offline
      CadFather
      last edited by

      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

        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
        • CadFatherC Offline
          CadFather
          last edited by

          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

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

            Advertisement