[ruby doc] Model - undocumented methods
-
OK, first of all an one-liner to get all methods from the active model (-> form a Model object):
puts((Sketchup.active_model.methods-Object.methods).sort)
I'm running Windows XP, Sketchup 6.4.112
Two of the methods are not documented
- get_product_family - returns 3 - maybe it returns which kind of product (free or pro version) the user is running
- skpdoc - returns 170625304, 170625368 or 170744800 - I really don't know, what this one is used for und returns, but the number is different after each Sketchup restart
azuby
-
skpdoc is a bridge to SDK world - it gives back the pointer to the Sketchup document interface. funny thing that it was available in SU5, removed in SU6 (least in 6.0.515 it was not available) and now is back
-
I think "get_product_family" is part of 'attribute' ruby stuff that you might have tried ?
-
I'll get the official word to see how Google wants to doc the API thing, and also the get_product_family as well.
I'll report back when I hear back, or perhaps Google will post here. We'll see.
Thanks, Todd
-
The official word is they aren't to be documented, as they may go away at any time.
Todd
-
[API] Model.get_product_family
http://code.google.com/apis/sketchup/docs/ourdoc/model.html#get_product_familySince this thread was last active (2008,) method .get_product_family has been documented in the API. I find it strange that this method is within the Model class, as it's a application attribute, and belongs within the Sketchup module (or an App subclass of module Sketchup.) I have posted this observation in the 7.x API thread.
So the question(s) I have is:
Is it ( Model.get_product_family ) really to be considered as deprecated ??
And if so, should not the API doc (link above,) mention this ( and perhaps direct coders to use Sketchup.is_pro? instead ) ??
-
@dan rathbun said:
Is it ( Model.get_product_family ) really to be considered as deprecated ??
Dan,
Now that the get_product_family method has been added to the API docs and our internal unit test suite, it is no longer at danger of being removed. In 2008 the thing existed, of course, but since it wasn't documented there was some doubt about its future.
It's so cute and quirky, we've decided to keep it.
(I agree with you that it's attached to the wrong object, BTW. But once a method's in the wild it's really, really hard to change it.)
Cheers,
-
@unknownuser said:
It's so cute and quirky, we've decided to keep it.
(I agree with you that it's attached to the wrong object, BTW. But once a method's in the wild it's really, really hard to change it.)
Cheers,
Well this is going to sound condescending no matter how i put it so i'll dispense with any niceties and just be blunt, hope you all can handle it...?
It seems the API was written by people who have no experience using it. This is what happens when you get a bunch of low level C hackers who hardly use high-level scripting languages to spec out an API. I think it would behoove the dev team to gather input from the soldiers in the trenches instead of just barking orders from the White House.
Dan (along with Jim and others) has documented time and again the atrocities of the API and i have noticed many more. The fact is that we need to look towards a major release where all these blasphemies can be rectified into a beautiful API we can all love. Look i know mistakes are unavoidable and i am in no way saying i am better than anyone here. So lets put our collective heads together and make this API all it can be!
Are you with me?
Advertisement