Sketchup Constants
-
Is there a list of the various constants Sketchup has defined. Looking at a script I just realised that there's a constant Z_AXIS that defines a vector (0,0,1).
What other gems are there?
-
Object.constants.sort
Alsoglobal_variables
is interesting.I think Jim showed me both of those.
-
Yea, but no that describes what they do?
AndObject.constants.sort
also return ALL constants - even them defines by rubys. Don't know how to determine them apart. -
Also list Class names....
-
The only way I know of is to unload all rubies and then run it to see what the SU Constants are. And I noticed it lists all classes too. I thought maybe SU declares classes as constants for some reason? Or is that a Ruby feature?
And to find out what each one does....yeah, no real easy way. But you can type the Constant into the console and see what the constant contains. Some of the constants, VK_UP and all the VK's are described in the API.
-
This produces a cleaner report.
Object.constants.sort.join("\n")
-
Made a list here - I got all the SketchUp constants there, but the RUby constant list is incomplete.
-
Thanks Jim.
Advertisement