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

[Plugin] ToolbarEditor (1.1.2) – updated 08.06.2014

Scheduled Pinned Locked Moved Plugins
122 Posts 40 Posters 57.9k Views
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.
  • D Offline
    deaneau
    last edited by 18 Apr 2015, 08:15

    hello,
    how look a ruby-snipped to have a plugin with an icon?

    some developer have only plugins that's work in menue. ok i could add short-cuts for this, however sometimes i would have a toolbar with all my most used plugins together.

    MADE, BORN AND LIVING IN BERLIN
    Big Thank You to all Programmers
    Some German words are so long that they have a perspective. M.Twain

    1 Reply Last reply Reply Quote 0
    • T Offline
      TIG Moderator
      last edited by 18 Apr 2015, 10:32

      @deaneau said:

      hello,
      how look a ruby-snipped to have a plugin with an icon?

      some developer have only plugins that's work in menue. ok i could add short-cuts for this, however sometimes i would have a toolbar with all my most used plugins together.
      See how plugins that do have a toolbar do it...
      Typically the plugin's menu entry is set up using a 'command'.
      You can add a line or two of code to that to use that command in a new toolbar.
      You'll need an icon png file to be loaded from somewhere.
      After all of the scripts have loaded as SketchUp starts, you cannot add items to an existing menu or toolbar.
      Several scripts can add items to an existing menu or toolbar if they do so as they load when SketchUp starts, but this is only possible if that menu or toolbar has a 'reference' that they can access - e.g. an @instance_variable or a CONSTANT, which has been set up in a module which they all share, or a $global_variable_with_a_unique_name [not recommended as it is shared by all modules and could clash with other's too]...

      An example of the menu making command is:

      
      unless file_loaded?(__FILE__)
      	cmd = UI;;Command.new("SomeCommandName"){ SomeCommand.new() }
      	UI.menu("Plugins").add_item(cmd)
      ### START - ADD TOOLBAR HERE...
      ### END -   ADD TOOLBAR HERE
      	file_loaded(__FILE__)
      end
      

      If it's a 'Tool' the CMD setup is slightly different...

      An example to use that within a toolbar is this additional code added between the ### markers:

      cmd.tooltip = "SomeCommandName"
      cmd.status_bar_text = "SomeText"
      cmd.small_icon = File.join("SomeCommandFolder/ImagesFolder", 'icon-24.png')
      cmd.large_icon = File.join("SomeCommandFolder/ImagesFolder", 'icon-32.png')
      toolbar = UI;;Toolbar.new("SomeCommandName")
      toolbar.add_item(cmd)
      toolbar.show if toolbar.get_last_state.abs == 1 # TB_VISIBLE/NEVER
      

      Note how addition properties are needed for the cmd to be used in a toolbar.
      The path to the button icons and their names is up to you...
      Remember to use a plain-text editor like Notepad++ to edit the .rb file.
      Encoding must be UTF-8_without_BOM to be compatible with all SketchUp versions...

      TIG

      1 Reply Last reply Reply Quote 0
      • T Offline
        thomthom
        last edited by 18 Apr 2015, 12:31

        @tig said:

        toolbar.show if toolbar.get_last_state.abs == 1 # TB_VISIBLE/NEVER

        toolbar.restore does the exact same thing.

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

        1 Reply Last reply Reply Quote 0
        • D Offline
          deaneau
          last edited by 18 Apr 2015, 18:59

          thanks at TIG and ThomThom... i will look at this deeper in the next week.

          thank you

          MADE, BORN AND LIVING IN BERLIN
          Big Thank You to all Programmers
          Some German words are so long that they have a perspective. M.Twain

          1 Reply Last reply Reply Quote 0
          • E Offline
            Esense3d
            last edited by 18 Apr 2015, 19:19

            Thank You
            but downloadlink do not work for me ?

            1 Reply Last reply Reply Quote 0
            • T Offline
              TIG Moderator
              last edited by 19 Apr 2015, 13:22

              @esense3d said:

              Thank You
              but downloadlink do not work for me ?
              Have you tried the PluginStore RBZ ??
              http://sketchucation.com/pluginstore?pln=ae_ToolbarEditor

              TIG

              1 Reply Last reply Reply Quote 0
              • D Offline
                deaneau
                last edited by 20 Apr 2015, 18:18

                short answer. SKP2015 make and pro works. download and install.

                @Esense3d.. dont be shy to answer.

                the shortest and fastest answer is this (if this work)

                => 👍 <=

                😉

                MADE, BORN AND LIVING IN BERLIN
                Big Thank You to all Programmers
                Some German words are so long that they have a perspective. M.Twain

                1 Reply Last reply Reply Quote 0
                • G Offline
                  Guilherme Bera
                  last edited by 21 Jul 2016, 06:04

                  Wow, thanks Aerilius for this plugin!! I was so amazed that I added the toolbar function to a bunch of plugins. Indeed, I'll post to each author, my icons and the modified script.

                  Anyway, I was wondering if would be possible mix the Toolbar Editor and the LaunchUp. Let's me explain, the LaunchUp is able to keep the last searched function as a mini functional toolbar. And the Toolbar Editor make possible create custom toolbars. So, you would have some floating windows grouping your custom toolbars, a even more revolutionary UI implementation.

                  I'd like to make me helpful, but I'm just a ruby starter yet.

                  1 Reply Last reply Reply Quote 0
                  • greenskpG Offline
                    greenskp
                    last edited by 29 Jul 2016, 18:44

                    Thank you very much!

                    1 Reply Last reply Reply Quote 0
                    • G Offline
                      Guilherme Bera
                      last edited by 16 Aug 2016, 03:55

                      @aerilius said:

                      The toolbars are stored in the registry
                      HKEY_CURRENT_USER\Software\SketchUp\SketchUp 2014\Plugins_ae\ToolbarEditor.
                      You can copy and paste it in the same key on another SketchUp installation or version. You can also use the File → Export functionality of the registry. I'm not sure whether I should add an export button to each of my plugins, I hope SketchUp will provide an efficient and central place to migrate settings.

                      From a developer side, I want to emphasis again that most of us want plugin settings to be namespaced and bundled in one sub-key, and not mixed within SketchUp's internal keys.

                      I did my backup in this way, and today I restarted my windows and restored the registry key. The custom toolbar appeared again, but I was unable to add more toolbar or functions.

                      So the only way was to redo all the custom toolbars 😞

                      1 Reply Last reply Reply Quote 0
                      • T Offline
                        thirdleft
                        last edited by 17 Sept 2016, 03:12

                        When I import my registry from one computer to another it loads all of the toolbars but does not load the buttons.Any ideas why this may be happening?

                        Thanks in advance!

                        1 Reply Last reply Reply Quote 0
                        • T Offline
                          thirdleft
                          last edited by 19 Sept 2016, 05:13

                          @thirdleft said:

                          When I import my registry from one computer to another it loads all of the toolbars but does not load the buttons.Any ideas why this may be happening?

                          Thanks in advance!

                          Okay the problem is because it remembers the username of the original computer. I logged into a colleagues computer with my username and it works but when i log in with his it doesnt. Is there any way of fixing this manually?

                          Ideally i want to set up a registry and plugin data file for 3-4 users in our office so we all have the same toolbars but because we obviously dont have the same username it isnt working. Does this mean i have to set it up one by one?

                          Thanks for all your help

                          Regards,
                          Keith

                          1 Reply Last reply Reply Quote 0
                          • J Offline
                            Jim
                            last edited by 19 Sept 2016, 20:54

                            Look also in your "%APPDATA%\SketchUp Toolbar Editor" folder for toolbar commands.

                            Hi

                            1 Reply Last reply Reply Quote 0
                            • R Offline
                              rv1974
                              last edited by 20 Sept 2016, 07:39

                              I've got subjective feeling that my custom TE icon loading is painfully slow on start-up.
                              Is it possible or loading original toolbars would take the same amount of time?

                              1 Reply Last reply Reply Quote 0
                              • A Offline
                                Ahmed0007
                                last edited by 17 Mar 2019, 02:16

                                Toolbar Editor (1.1.3); not showing any icon in sketchup 2016, 17, 18 but it's showing 2019 can you please fix this problem.

                                1 Reply Last reply Reply Quote 0
                                • panixiaP Online
                                  panixia
                                  last edited by 24 Jan 2020, 12:15

                                  Is there a code snippet i can use to emulate keystrokes?
                                  That would be a quick way to create a custom button which mimics a shortcut for menu entry.. ❗

                                  1 Reply Last reply Reply Quote 0
                                  • dereiD Offline
                                    derei
                                    last edited by 22 Mar 2021, 11:49

                                    Is this plugin still being maintained? For some reason it doesn't add separators anymore.

                                    DESIGNER AND ARTIST [DEREI.UK](http://derei.uk/l)

                                    1 Reply Last reply Reply Quote 0
                                    • jujuJ Offline
                                      juju
                                      last edited by 22 Mar 2021, 17:20

                                      @derei said:

                                      Is this plugin still being maintained? For some reason it doesn't add separators anymore.

                                      Latest version on EW is 1.1.8

                                      Save the Earth, it's the only planet with chocolate.

                                      1 Reply Last reply Reply Quote 0
                                      • dereiD Offline
                                        derei
                                        last edited by 25 Mar 2021, 11:46

                                        that's the one I have installed and it was acting funny by not adding separators on toolbars despite the fact they were being added in the editor. After briefly looking over the script, it seems the id of the elements is being taken from LaunchUp, so perhaps that one isn't being updated?

                                        DESIGNER AND ARTIST [DEREI.UK](http://derei.uk/l)

                                        1 Reply Last reply Reply Quote 0
                                        • 1
                                        • 2
                                        • 3
                                        • 4
                                        • 5
                                        • 6
                                        • 7
                                        • 6 / 7
                                        • First post
                                          Last post
                                        Buy SketchPlus
                                        Buy SUbD
                                        Buy WrapR
                                        Buy eBook
                                        Buy Modelur
                                        Buy Vertex Tools
                                        Buy SketchCuisine
                                        Buy FormFonts

                                        Advertisement