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.
    • EdsonE Offline
      Edson
      last edited by

      sorry, max. it may seem clear to you but i am not getting what i am supposed to do. lead me through it, ok?

      after i paste Sketchup.active_model.options["UnitsOptions"]["LengthFormat"] what do i do? where do decimal and meters go? with or without quotation marks, etc? and where do i insert the unit options?

      write down one of the options and i will figure out the others.

      cheers.

      edson mahfuz, architect| porto alegre • brasil
      http://www.mahfuz.arq.br

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

        Sorry 😳 !
        Procedure :
        For all units format (decimal, architectural, engineering, Fractional) -> N°1 on the picture

        1. Change the format in the unit SU window (N°1)
        2. Copy, paste and excecute the code in the ruby console (N°3)
        Sketchup.active_model.options["UnitsOptions"]["LengthFormat"]
        
        1. Show me the result of the code in the ruby console Like my last post.

        For all units length (Inch, feet, millimeters, centimeters, meters) -> N°2 on the picture

        1. Change the length in the unit SU window (N°2)
        2. Copy, paste and excecute the code in the ruby console (N°3)
        Sketchup.active_model.options["UnitsOptions"]["LengthUnit"]
        
        1. Show me the result of the code in the ruby console Like my last post.

        If it's too constraining for you, don't hesitate to tell, I understand 😄
        Sorry again, Edson!


        Sans titre 1.jpg

        Frenglish at its best !
        My scripts

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

          gotcha! is this it?


          Picture 21.png

          edson mahfuz, architect| porto alegre • brasil
          http://www.mahfuz.arq.br

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

            Great ! The only problem is that it's the same thing as Window.... I d'ont understand your (Big) Mac Bug.... 😡 😡 😡
            Thank you Edson!

            Frenglish at its best !
            My scripts

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

              @edson said:

              matt,
              good news from the mac side of life. it works. however, in order to see the change in the info panel i must close it and open it again (not a big problem).
              what could be improved is the fact that the icon bar does not reflect the present units chosen. see the picture: i have decimal and centimeters on it but the icon bar is not reflecting it. sometimes it is all gray, others white. the buttons seem to "stick".
              but we made some progress.

              Just one thing... With this update, can you try this : [floatr:22oduved]Sans titre 1.jpg[/floatr:22oduved]

              1. Draw a line
              2. Create a dimension entity of this line
              3. Try to change units in the toolbar...
                Is the dimension change ?
                On windows, dimension changes each time you change units...

              Frenglish at its best !
              My scripts

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

                matt,

                yes, the dimensions change. the functionality is now perfect.Picture 14.png

                however, the buttons stay in "pressed" mode even when you change units. check below: after testing the meter button, i clicked on cm and then mm. all of them stayed as if they were active. would there be a way for making only the active unit's button to show as such? Picture 15.png

                edson mahfuz, architect| porto alegre • brasil
                http://www.mahfuz.arq.br

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

                  Ok cool! Thank you!
                  Do you have any error in the ruby console?

                  Frenglish at its best !
                  My scripts

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

                    no errors.

                    edson mahfuz, architect| porto alegre • brasil
                    http://www.mahfuz.arq.br

                    1 Reply Last reply Reply Quote 0
                    • kenK Offline
                      ken
                      last edited by

                      Sir

                      Matt666 your Plugin Toggle Units is very useful and I use it all the time when I get marine vessels in metric and diving equipment in Imperial.

                      Just one question, would it be possible to add up and down precision buttons, so with a mouse selection, one could change the precision of the display either up or down as required?

                      Thanks in advance and again thanks for the very useful plugin.

                      Ken

                      Fight like your the third monkey on Noah's Ark gangway.

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

                        Hi Ken.
                        in the first post, a new tool has been added. The last with 11 icons.
                        Enjoy !

                        Frenglish at its best !
                        My scripts

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

                          Hi Matt, will do some new icons soon for all eleven (didn't like the other ones) 😄

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

                            Cool!

                            Frenglish at its best !
                            My scripts

                            1 Reply Last reply Reply Quote 0
                            • kenK Offline
                              ken
                              last edited by

                              Hi Matt

                              Thanks. As you can see from my avatar, I design in flat steel plate, and 1/8” is close enough for welders.

                              Your response was faster service than I had at the restaurant I just returned from. Hope others find this helpful.

                              Again much thanks.

                              And on a side note, my youngest daughter is trying to be an exchange student to France this summer. She is taking French in HS this year. I know if she gets to go, she will have a great time.

                              Again thanks

                              Ken

                              Fight like your the third monkey on Noah's Ark gangway.

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

                                @unknownuser said:

                                I know if she gets to go, she will have a great time.

                                Sure! 😄
                                Where will she want to go in France?

                                Frenglish at its best !
                                My scripts

                                1 Reply Last reply Reply Quote 0
                                • kenK Offline
                                  ken
                                  last edited by

                                  Matt

                                  See will find out in the next two weeks if she is accepted and where exactly where she is going.

                                  Thanks for asking

                                  Ken

                                  Fight like your the third monkey on Noah's Ark gangway.

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

                                    I've updated first post with a new tool and new icons by CadFather! Thank you Max!
                                    Edson or Thomthom, does this version work on Mac?

                                    Frenglish at its best !
                                    My scripts

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

                                      i am afraid only the three added features work. the rest does not (but was working perfectly before). no error in the ruby console.


                                      toggle-units.png

                                      edson mahfuz, architect| porto alegre • brasil
                                      http://www.mahfuz.arq.br

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

                                        Incredible... That's incredible! Cheer up! We will success...

                                        Frenglish at its best !
                                        My scripts

                                        1 Reply Last reply Reply Quote 0
                                        • kenK Offline
                                          ken
                                          last edited by

                                          Matt

                                          Installed and works as advertised. Also, like the additional button.

                                          Thank you.

                                          Ken

                                          Fight like your the third monkey on Noah's Ark gangway.

                                          1 Reply Last reply Reply Quote 0
                                          • JClementsJ Offline
                                            JClements
                                            last edited by

                                            Ahhhh ... changed already. I added a red dot to the original set to show the association between related buttons.

                                            CAD father's, as always, are nice icons.

                                            John


                                            example.png

                                            John | Illustrator | Beaverton, Oregon

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

                                            Advertisement