[Plugin] Polar line - 20110525
-
Hey, I notice you use $lg and then lg. Is it suppose to be two different things?
-
@unknownuser said:
Does PC SU and MacSU use the same Ruby version?
I don't know, but I often have problems...@unknownuser said:
I can have a look on my own Mac when I get home.
Thank you !@unknownuser said:
Hey, I notice you use $lg and then lg. Is it suppose to be two different things?
I will look in the code... Thank you! -
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.
-
Ok cool !! Thank you for your bug research Thomthom !
I am pretty sure it works if you try this code belowSketchup.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...
-
I'll try it and report back.
-
Yes, that worked.
-
Thank you Thomthom!
I've updated the first post... Can you try it on Mac please? Thank you! -
matt,
now nothing happens at all. not even the request for the first point appears.
-
Can you show me the error in the ruby console please? -
the console window was filled with a lot of stuff. this is the last piece. if you need the rest, let me know.
-
Excuse me Edson... A silly error... Shame on me !I updated the code...
Sorry ! -
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.
-
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... -
I got a Mac Mini at disposal on a OSX 10.4 system. Slow as heck, but works to see if it runs.
-
Ok, Thank you Thomthom!
-
sorry Thomthom, but can you have a Mac look on this script, please?
-
@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.
-
Hey Matt,
Just installed your script. Good stuff. The icon matches nicely too. Keep'em comin'.
Cheers,
Jeff -
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:Objectcheers
-
That sounds like the file doesn't have
require 'sketchup.rb'
. A bug that won't be noticed if you have other plugins installed thatrequire 'sketchup.rb'
.
Advertisement