• Login
sketchucation logo sketchucation
  • Login
๐Ÿค‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

[Plugin] Toggle Units

Scheduled Pinned Locked Moved Plugins
159 Posts 47 Posters 116.4k 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
    Didier Bur
    last edited by 1 Aug 2008, 19:24

    Matt,
    STP remplace "unity" par "unit" dans le script. Unity veut dire ร  peu prรจs "unification". ๐Ÿ˜‰

    DB

    1 Reply Last reply Reply Quote 0
    • M Offline
      Matt666
      last edited by 1 Aug 2008, 19:26

      @CadFather, Thank you ! Could you post them in png format, please ?

      @didier said:

      STP remplace "unity" par "unit" dans le script. Unity veut dire ร  peu prรจs "unification".

      ๐Ÿ˜ณ ๐Ÿคฃ Vive mon anglais dรฉsastreux !

      You're welcome Cornel !! ๐Ÿ˜‰

      Frenglish at its best !
      My scripts

      1 Reply Last reply Reply Quote 0
      • C Offline
        CadFather
        last edited by 1 Aug 2008, 20:23

        ..they do need touching up, but here they are


        16&24 PNG.rar

        1 Reply Last reply Reply Quote 0
        • M Offline
          Matt666
          last edited by 2 Aug 2008, 15:34

          The 9 icons script has been updated with new icons on the script post. Please try it Edson !

          Thank you CadFather !!

          Frenglish at its best !
          My scripts

          1 Reply Last reply Reply Quote 0
          • E Offline
            Edson
            last edited by 3 Aug 2008, 01:38

            @matt666 said:

            The 9 icons script has been updated with new icons on the script post. Please try it Edson !

            no change, matt. still not working on mac. i click on the icons and nothing changes; it keeps the unit set through model info-->units.

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

            1 Reply Last reply Reply Quote 0
            • M Offline
              Matt666
              last edited by 3 Aug 2008, 12:11

              Aaaargh ! I don't understand ๐Ÿ˜ฎ ๐Ÿ˜ฎ ๐Ÿ˜ฎ ๐Ÿ˜ž ๐Ÿ˜ž

              I need some help... I will ask others french scripters ๐Ÿ˜‰ ! THERE IS A SOLUTION !!

              Frenglish at its best !
              My scripts

              1 Reply Last reply Reply Quote 0
              • C Offline
                CadFather
                last edited by 3 Aug 2008, 12:29

                anyone else on mac having the same problem?

                1 Reply Last reply Reply Quote 0
                • J Offline
                  jiegou
                  last edited by 9 Aug 2008, 12:27

                  very good!thanks.

                  1 Reply Last reply Reply Quote 0
                  • M Offline
                    Matt666
                    last edited by 11 Dec 2008, 07:05

                    Can someone test this last one on Mac, please ?

                    Frenglish at its best !
                    My scripts

                    1 Reply Last reply Reply Quote 0
                    • E Offline
                      Edson
                      last edited by 11 Dec 2008, 10:49

                      still not working on my mac. nothing changes after i click on any icon. and btw, the meter icon is not showing.


                      Picture 16.png

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

                      1 Reply Last reply Reply Quote 0
                      • C Offline
                        CadFather
                        last edited by 11 Dec 2008, 11:56

                        ..on pc that happens only if fractional or engineering is selected - once i click on decimal (from the toggle units icons) all icons become selectable and everything works..

                        i think we really need some 'certified mac testers'.. (or they may be left behind) ๐Ÿ˜‰

                        1 Reply Last reply Reply Quote 0
                        • M Offline
                          Matt666
                          last edited by 11 Dec 2008, 13:15

                          +1 for certified mac testers!
                          Sorry Edson for that and thank you so much to loose some time for script testing ! ๐Ÿ˜„

                          Frenglish at its best !
                          My scripts

                          1 Reply Last reply Reply Quote 0
                          • E Offline
                            Edson
                            last edited by 11 Dec 2008, 13:38

                            @matt666 said:

                            +1 for certified mac testers!
                            Sorry Edson for that and thank you so much to loose some time for script testing ! ๐Ÿ˜„

                            no problem, matt. it is a pleasure to be of help. could you be more specific as to which is the build to be tested? i looked at the first post of this thread and saw nothing different there.

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

                            1 Reply Last reply Reply Quote 0
                            • M Offline
                              Matt666
                              last edited by 11 Dec 2008, 14:21

                              Yep! On Fedo6 advices, I changed the way that script called preferences units...
                              So we have to try some things...
                              Open your ruby console, copy and paste code below and can you show me the result please ?

                              toggle_units(1)
                              

                              And

                              Sketchup.active_model.options["UnitsOptions"]["LengthUnit"]
                              

                              And

                              var = Sketchup.active_model.options["UnitsOptions"];var["LengthUnit"]= 4
                              

                              And this one (can you replace "VAR" by result of the last code entered, please ?

                              toggle_units_validation_proc(<VAR>)
                              

                              Another thing : When does error message appears? While start of SU? After clicking on an icon?

                              Sorry for all these tests, but it's necessary if I want to find the problem!
                              Thank you Edson!

                              Frenglish at its best !
                              My scripts

                              1 Reply Last reply Reply Quote 0
                              • E Offline
                                Edson
                                last edited by 11 Dec 2008, 14:55

                                matt,

                                do no be sorry. just keep the tests coming.

                                see the results in the attached picture. i do not get any error messages. it just does not change units.

                                cheers.


                                Picture 18.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 11 Dec 2008, 15:13

                                  ๐Ÿ˜ฒ toggle_units(1) works!! Try toggle_units(1), toggle_units(2), toggle_units(3) etc... And take a look in the units window (Windows->Model info->Units), normally drawing unit changes...
                                  So I will post an update soon with toolbar code changed! Thank you Edson !

                                  Frenglish at its best !
                                  My scripts

                                  1 Reply Last reply Reply Quote 0
                                  • M Offline
                                    Matt666
                                    last edited by 11 Dec 2008, 15:26

                                    @edson said:

                                    no change, matt. still not working on mac. i click on the icons and nothing changes; it keeps the unit set through model info-->units.

                                    Hi !
                                    I go back on this plugin, with another attempt for Mac users. Edson, Can you try please? ๐Ÿ˜‰

                                    EDIT1 : One other (And I hope the last !) update!


                                    toggle_units.zip

                                    Frenglish at its best !
                                    My scripts

                                    1 Reply Last reply Reply Quote 0
                                    • M Offline
                                      Matt666
                                      last edited by 11 Dec 2008, 15:27

                                      Ok, I've finished this update! Can you try it, Edson, please? Thank you!

                                      Frenglish at its best !
                                      My scripts

                                      1 Reply Last reply Reply Quote 0
                                      • E Offline
                                        Edson
                                        last edited by 11 Dec 2008, 17:34

                                        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.


                                        Picture 19.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 12 Dec 2008, 10:06

                                          Wow... Strange!
                                          Thank you Edson! We will slowly succeed! ๐Ÿ˜„

                                          Another request, please... A daunting request...

                                          Can you open your ruby console and your units window (in model info), please?
                                          Copy and paste code below in the ruby console

                                          Sketchup.active_model.options["UnitsOptions"]["LengthFormat"]
                                          

                                          Change unit format, paste the code in the ruby console and give me the result like that :

                                          @unknownuser said:

                                          Unit format (decimal, Architectural) -> result of the code

                                          Can You do that for all SU unit Format please? ๐Ÿ˜›

                                          The same thing for units length... With this code :

                                          Sketchup.active_model.options["UnitsOptions"]["LengthUnit"]
                                          

                                          Here is units options in SU/Windows :
                                          Unit Format

                                          • Architectural -> 1
                                          • Decimal -> 0
                                          • Engineering -> 2
                                          • Fractionnal -> 3

                                          Unit Length

                                          • Inches -> 0
                                          • Feet -> 1
                                          • Millimeters -> 2
                                          • Centimeters -> 3
                                          • Meters -> 4

                                          Thank you Edson!

                                          Frenglish at its best !
                                          My scripts

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

                                          Advertisement