Sketchup.version vs. Sketchup.version_number
-
Why different results:
Sketchup.version
7.0.10247Sketchup.version_number
7000999??
-
http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/sketchup.html#version
@unknownuser said:
Sketchup.version
Gets the current version of sketchup in decimal formhttp://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/sketchup.html#version_number
@unknownuser said:
Sketchup.version_number
Get the current version of sketchup as a whole number for comparisons -
Thomthom, i think version_number is just meant to return the SU version without the decimal points. At least thats how it works in SU6.
I'm guessing it's a bug
-
You sure? I'm not seeing that.
SU6:
Sketchup.version_number 6004112
SU7:
Sketchup.version_number 7000999
version_number
number returns an integer (whole number), whileversion
returns a string. -
Probably my ruby noobishness showing through there.
I was referring to the numbers themselves (conveniently ignoring a few zeroes as well.)
In SU6:
version gives 6.4.112
version_number gives 6004112in SU7:
version gives 7.0.10247
version_number gives 7000999So going by what SU6 gives i would have thought SU7 would have given 700010247.
I wonder if it's something to do with version_number being limited to 7 figures? i.e. it gets to 999 but cant go any further.
-
@remus said:
So going by what SU6 gives i would have thought SU7 would have given 700010247.
I wonder if it's something to do with version_number being limited to 7 figures? i.e. it gets to 999 but cant go any further.
Yea, I think it might be worth mentioning this to the SU team.
-
@unknownuser said:
Yea, I think it might be worth mentioning this to the SU team.
Does they read it here, or must someone take more action/bug report?
-
They are around on the forum. Not sure if it'll be seen on this section though. More likely if it's put into the Bug section. The Ruby section might work as well, but there's so many posts there everyday that they might get lost in the mass.
-
@remus said:
Yea, I think it might be worth mentioning this to the SU team.
The problem occurred when the last component of our version number exceeded 3 digits in length. That's why SU6 (.112) works, while SU7 (.8656, .10247, etc.) doesn't. We have an open bug for this issue.
Advertisement