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

    [Plugin] Toggle Units

    Scheduled Pinned Locked Moved Plugins
    159 Posts 47 Posters 116.4k Views 47 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.
    • M Offline
      Matt666
      last edited by Matt666

      • EDIT1: Add a folder in the zip, after Edson issue.
      • EDIT2: Another version, with all drawing unity type : Decimal, architectural, etc... 9 icons
      • EDIT3: Updated with CadFather icons... And a try to make it compatible with mac.
      • EDIT4: Request by Ken, two icons added. They increase or decrease drawing precision.
      • EDIT5: Last update with cool icons from Mister CadFather! And another icon that displays unit on dimensions entities.
      • EDIT6 [by TIG]: 20110129 - added v7.1/8 friendly version
      • EDIT7 [by TIG]: 20100129 - updated version to correct icon paths
      • EDIT8: 20110912 - New tool added: Toolbar manager.
      • EDIT9: 20110915 - Mac bug fixed and add tool in extensions window. Thanks to driven!** EDIT10: 20140302 - Bug on new SU version. Thanks to jiminy-billy-bob.

      Hi all. First of all I would like to thank Thomthom for his help with javascript, and TIG for his advice in ruby.
      Here is a script that change drawing units quickly.
      Toolbar.jpg

      You can manage toolbar with "Toolbar Manager", by clicking in Plugins->Toggle units->Toolbar manager
      Toggle_units_Menu.jpg

      You should be able to choose icons you want to display in the toolbar. Thank you to kyyu for giving me the idea.
      Toggle_units_ToobarManager.jpg

      PS: WOW, 1178 downloads, thank you! ^^

      Please get the latest version from the PluginStore [now v2014 compliant]http://sketchucation.com/pluginstore?pln=Matt_Toggle_Units

      Frenglish at its best !
      My scripts

      1 Reply Last reply Reply Quote 0
      • M Offline
        Matt666
        last edited by

        Hi !

        @unknownuser said:

        also, the units redraw only when i click on the screen or (press the esc key) - is that to do with screen refresh? if so is there any way to make it refresh automatically?

        The post containing scripts has been updated with your improvment.

        @unknownuser said:

        one question.. how can i assign a keyboard shortcut to one of them? or is it not possible?

        The only solution (I think) is to create a menu "units" in the menu plugins, and to add a shortcut to it... I've added another script which add a menu "unities" in the menu plugins.

        Frenglish at its best !
        My scripts

        1 Reply Last reply Reply Quote 0
        • CadFatherC Offline
          CadFather
          last edited by

          Thank you Mr brain! ekwave.gif just Perfect!

          1 Reply Last reply Reply Quote 0
          • M Offline
            Matt666
            last edited by

            Thank you...
            http://www.smileys-fr.com/smileys/forum/10.gif

            Frenglish at its best !
            My scripts

            1 Reply Last reply Reply Quote 0
            • CadFatherC Offline
              CadFather
              last edited by

              Matt, just one more thing (last one!) - i opened your script and i think it is meant to change the toolbar icon when i change the units, is that true?

              1 Reply Last reply Reply Quote 0
              • M Offline
                Matt666
                last edited by

                I tried to do that, but I don't know how... For the moment, Icon changes only at the start of SU...

                Frenglish at its best !
                My scripts

                1 Reply Last reply Reply Quote 0
                • CadFatherC Offline
                  CadFather
                  last edited by

                  i see, cool 'unity toolbar' stuff though... πŸ˜„ πŸ‘

                  1 Reply Last reply Reply Quote 0
                  • EdsonE Offline
                    Edson
                    last edited by

                    @matt666 said:

                    Here is the script.

                    Two versions :

                    • Juste one icon, which toggle unity drawing. It changes only at the start of Su, according to current unit.
                    • Five icons

                    i tried to install the 1 icon version but it did not work. instead i got this message:
                    @unknownuser said:

                    Error Loading File toggle_units.rb
                    can't convert nil into String

                    what is the correct installation method? the rb file goes in the pligins folder, but what do i do with the icons? do i put them there directly or inside a folder?

                    thanks.

                    edson mahfuz, architect| porto alegre β€’ brasil
                    http://www.mahfuz.arq.br

                    1 Reply Last reply Reply Quote 0
                    • EdsonE Offline
                      Edson
                      last edited by

                      i managed to install the 5 icon version but it did not work. there is no change in the VCB and when i click the model info window i still have the unit the file was set up to when the file was opened.

                      edson mahfuz, architect| porto alegre β€’ brasil
                      http://www.mahfuz.arq.br

                      1 Reply Last reply Reply Quote 0
                      • M Offline
                        Matt666
                        last edited by

                        Hi edson !
                        Puts all the package in plugins. Without any folder.
                        It works here !

                        Frenglish at its best !
                        My scripts

                        1 Reply Last reply Reply Quote 0
                        • C Offline
                          cornel
                          last edited by

                          Matt,

                          Beside those 'Decimals'
                          can you include 'Architectural' format?!

                          Cornel

                          1 Reply Last reply Reply Quote 0
                          • M Offline
                            Matt666
                            last edited by

                            I have edited the script post with your improvment !
                            πŸ˜‰

                            Frenglish at its best !
                            My scripts

                            1 Reply Last reply Reply Quote 0
                            • M Offline
                              Matt666
                              last edited by

                              Edson, do you still have same problems?

                              Frenglish at its best !
                              My scripts

                              1 Reply Last reply Reply Quote 0
                              • EdsonE Offline
                                Edson
                                last edited by

                                sorry, matt, but it just does not work for me on mac. no changes of unit no matter what icon one clicks on.

                                installing the 1 icon version still brings the message quoted above. by the way, what is this one supposed to do? what is the unit it changes to?

                                edson mahfuz, architect| porto alegre β€’ brasil
                                http://www.mahfuz.arq.br

                                1 Reply Last reply Reply Quote 0
                                • M Offline
                                  Matt666
                                  last edited by

                                  Can you try with this script, please ?


                                  Work on Mac ?? Unzip all in the plugin folder.

                                  Frenglish at its best !
                                  My scripts

                                  1 Reply Last reply Reply Quote 0
                                  • V Offline
                                    Vichingo
                                    last edited by

                                    Hi,

                                    I am having some difficulties with the qua;ity of the Icons. For some reason they will not clean up, and they look very distored. Anybody want to desing some slick buttons to dress up this otherwise great plug

                                    1 Reply Last reply Reply Quote 0
                                    • EdsonE Offline
                                      Edson
                                      last edited by

                                      sure. no changes, ie, nothing happened. i have attached a screen grab for you to see that the error message is still showing and the toolbar shows a blank square (it does not change if i click on it).

                                      should you need me to test future changes on mac, just let me know.toggleunits.png

                                      edson mahfuz, architect| porto alegre β€’ brasil
                                      http://www.mahfuz.arq.br

                                      1 Reply Last reply Reply Quote 0
                                      • CadFatherC Offline
                                        CadFather
                                        last edited by

                                        ..phew - didn't know i was going to give you so much work Matt!

                                        i can draw some icons later today - can i suggest one further change to the scripts: if we have the icons in png formats they are much better quality..Thanks

                                        1 Reply Last reply Reply Quote 0
                                        • M Offline
                                          Matt666
                                          last edited by

                                          No problem CadFather πŸ˜‰

                                          Edson : Thank you !
                                          Have you unzipped ain the plugin folder, and keep icons in the folder "toggle_units_icons" ?
                                          If yes, Can you open ruby console, type this line please :

                                          Sketchup.find_support_file("tuin.gif", "Plugins/toggle_units_icons")
                                          

                                          and show me what it returns ?

                                          Thank you !

                                          Frenglish at its best !
                                          My scripts

                                          1 Reply Last reply Reply Quote 0
                                          • EdsonE Offline
                                            Edson
                                            last edited by

                                            it returns this:

                                            @unknownuser said:

                                            Sketchup.find_support_file("tuin.gif", "Plugins/toggle_units_icons")
                                            /Library/Application Support/Google SketchUp 6/SketchUp/Plugins/toggle_units_icons/tuin.gif

                                            cheers.

                                            edson mahfuz, architect| porto alegre β€’ brasil
                                            http://www.mahfuz.arq.br

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

                                            Advertisement