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

    Removing unused commands and shortening toolbars

    Scheduled Pinned Locked Moved Developers' Forum
    8 Posts 3 Posters 398 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.
    • U Offline
      unearthed
      last edited by

      Hi, Is there a way to shorten a toolbar, for instance I use ThomThom's LayerTools often - it's a great tool TT, thanks, although I only ever use five commands and so have removed the remainders associated button images:full width toolbar with images removed from folder
      The rest of the toolbar is 'wasted' screen space.

      Is their a way of reducing the toolbar length to equal the width of just the buttons in the folder so it looks like this?


      Capture Short toolbar.jpg

      Growplan - People ∩ Plants ∩ Place

      windows 7 64b, 4GB RAM, SU 8.0.16846
      Gimp, QGIS, Vectorworks 12, Bricscad 11

      1 Reply Last reply Reply Quote 0
      • TIGT Online
        TIG Moderator
        last edited by

        Yes but you need to edit some .rb file... best to ask its author where/how - perhaps PM him... ?
        Where it is effectively saying "sometoolbar.add_item(command)" you put a # in front of it to disable that line of code and thereby stop that button being added to the toolbar... Of course any update to the files will lose your changes...

        TIG

        1 Reply Last reply Reply Quote 0
        • U Offline
          unearthed
          last edited by

          Thanks for that TIG, I'll go and poke around in the .rb before I bother the writer - I was wrong it was Didier (with help from you apparently, according to the help file).

          Growplan - People ∩ Plants ∩ Place

          windows 7 64b, 4GB RAM, SU 8.0.16846
          Gimp, QGIS, Vectorworks 12, Bricscad 11

          1 Reply Last reply Reply Quote 0
          • U Offline
            unearthed
            last edited by

            Thanks TIG, that worked. Knowing almost nothing about ruby or coding in general I found I had to hash out all the lines concerning each icon e.g. (showing a modified and an unmodified commant set)

            *#Delete layer

            cmd1129 = UI::Command.new(("Delete layer")) { Sketchup.active_model.select_tool(DeleteClickedObjectLayer.new) }

            cmd1129.small_icon = "Layer Manager/lm_del_lay_16.png"

            cmd1129.large_icon = "Layer Manager/lm_del_lay_24.png"

            cmd1129.tooltip = "Delete layer"

            layertools_tb.add_item(cmd1129)

            #Lock layer
            cmd1229 = UI::Command.new(("Lock layer")) { Sketchup.active_model.select_tool(SetClickedObjectLayer.new("locked")) }
            cmd1229.small_icon = "Layer Manager/lm_set_locked_16.png"
            cmd1229.large_icon = "Layer Manager/lm_set_locked_24.png"
            cmd1229.tooltip = "Lock layer"
            layertools_tb.add_item(cmd1229)*

            and now I have a nice short toolbarshowing modified layer manager toolbar loaded.JPG.

            Growplan - People ∩ Plants ∩ Place

            windows 7 64b, 4GB RAM, SU 8.0.16846
            Gimp, QGIS, Vectorworks 12, Bricscad 11

            1 Reply Last reply Reply Quote 0
            • TIGT Online
              TIG Moderator
              last edited by

              Using
              **#** layertools_tb.add_item(cmd1129)
              alone will stop its command appearing in the toolbar.
              It might be a good idea to keep the other 'cmd1129' lines as defined - as they might be used in a 'menu' too ?
              By adding # in front of every line containing that 'cmd1129' you effectively stop the command getting created altogether...
              Your choice...

              TIG

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

                That's not my plugin...

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

                1 Reply Last reply Reply Quote 0
                • TIGT Online
                  TIG Moderator
                  last edited by

                  @thomthom said:

                  That's not my plugin...
                  I think it's Didier Bur's ?
                  The principal remains the same...

                  TIG

                  1 Reply Last reply Reply Quote 0
                  • U Offline
                    unearthed
                    last edited by

                    Thanks TIG for the heads up on how to do that - so far I've only needed that small cmd set, and yes I've since realised it's Didiers' plugin not ThomThoms'.

                    Growplan - People ∩ Plants ∩ Place

                    windows 7 64b, 4GB RAM, SU 8.0.16846
                    Gimp, QGIS, Vectorworks 12, Bricscad 11

                    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