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_variablesis interesting.I think Jim showed me both of those.
-
Yea, but no that describes what they do?
AndObject.constants.sortalso 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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement