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

    [Plugin] Polar line - 20110525

    Scheduled Pinned Locked Moved Plugins
    63 Posts 21 Posters 33.0k Views 21 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.
    • thomthomT Offline
      thomthom
      last edited by

      Got it nailed!

      It's all down to line 69:

      case Sketchup.active_model.options[0][2]
      

      On my mac it returned nil

      Your case switch doesn't account for that value so lg is passed on as a string.

      
      case Sketchup.active_model.options[0][2]
          when 0;lg = result[0].to_f
          when 1;lg = result[0].to_f.feet
          when 2;lg = result[0].to_f.mm
          when 3;lg = result[0].to_f.cm
          when 4;lg = result[0].to_f.m
      end
      
      

      My fix was to add a default handler for the switch.

      
      case Sketchup.active_model.options[0][2]
          when 0;lg = result[0].to_f
          when 1;lg = result[0].to_f.feet
          when 2;lg = result[0].to_f.mm
          when 3;lg = result[0].to_f.cm
          when 4;lg = result[0].to_f.m
          else  ;lg = result[0].to_f
      end
      
      

      Not sure why line 69 return nil though, didn't look into that.

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

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

        Ok cool !! Thank you for your bug research Thomthom !
        I am pretty sure it works if you try this code below

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

        can you try it please ?

        For "pl" variable, no problem. "$pl" is used to reuse last number entered in the polarline window...

        Frenglish at its best !
        My scripts

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

          I'll try it and report back.

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

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

            Yes, that worked. πŸ‘

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

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

              Thank you Thomthom!
              I've updated the first post... Can you try it on Mac please? Thank you!

              Frenglish at its best !
              My scripts

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

                matt,

                now nothing happens at all. not even the request for the first point appears.

                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 show me the error in the ruby console please?

                  Frenglish at its best !
                  My scripts

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

                    the console window was filled with a lot of stuff. this is the last piece. if you need the rest, let me know.


                    Picture 13.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

                      😳 😳
                      Excuse me Edson... A silly error... Shame on me !

                      http://msnsmileys.net/p/smileys/Popo/Shame.png

                      I updated the code...
                      Sorry !

                      Frenglish at its best !
                      My scripts

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

                        YESSSSSS! it does work!

                        and thanks, matt, for the great scripts you have been creating. count on me anytime to help you with testing scripts on mac.

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

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

                          😍 😍 😍
                          It does work, AT LAST !! Ouf... Thank you for your patience Edson!

                          @unknownuser said:

                          and thanks, matt, for the great scripts you have been creating.
                          Thank you, Edson 😳

                          @unknownuser said:

                          count on me anytime to help you with testing scripts on mac.
                          Ok, cool! There is also one only script that doesn't work on Mac... I'll try to do smt on it...

                          Frenglish at its best !
                          My scripts

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

                            I got a Mac Mini at disposal on a OSX 10.4 system. Slow as heck, but works to see if it runs.

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

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

                              Ok, Thank you Thomthom!

                              Frenglish at its best !
                              My scripts

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

                                sorry Thomthom, but can you have a Mac look on this script, please?

                                Frenglish at its best !
                                My scripts

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

                                  @matt666 said:

                                  sorry Thomthom, but can you have a Mac look on this script, please?

                                  Sorry, dude! I completely forgot. I'll see if I can have a look at it tomorrow.

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

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

                                    Hey Matt,
                                    Just installed your script. Good stuff. The icon matches nicely too. Keep'em comin'.
                                    Cheers,
                                    Jeff

                                    Have I mentioned how much of a laugh I get out of some of the Signatures on here!

                                    1 Reply Last reply Reply Quote 0
                                    • P Offline
                                      pmain68
                                      last edited by

                                      Hey ThomThom & Edson,

                                      Any ideas why i get this error when opening SU 8 after installing the polarline script?

                                      Error Loading File polarline.rb
                                      undefined method `file_loaded?' for main:Object

                                      cheers

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

                                        That sounds like the file doesn't have require 'sketchup.rb'. A bug that won't be noticed if you have other plugins installed that require 'sketchup.rb'.

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

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

                                          Hi all!
                                          New version updated. See first post. Thank you Thomthom & pmain68.

                                          Frenglish at its best !
                                          My scripts

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

                                            πŸ‘

                                            Could you add the date of update in the topic title? (Makes browsing plugins easier if you're looking for updates.)

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

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

                                            Advertisement