Searching for a plugin code template
-
Hello everyone,
I would like to "cleanly" code small extensions for SketchUp.
Is there somewhere an empty code template with best practices ? with comments that say "you have to put (this) here"
For example, I'm wondering about :
- how many folders ?
- where (folder) to put toolbar icons, what formats are supported ?
- where to put menu descriptions in the code ?
- how to separate the code into different files ?
- which "containers" to use in the code ?
I'm not a strong coder, so I'm sorry if these questions seem trivial.
Do you have anything like this to hand?
Thank you for your help,
Renaud -
It's a good idea to look at the sketchup example on github to get a feel for best practices
GitHub - SketchUp/sketchup-ruby-api-tutorials: SketchUp Ruby API Tutorials and Examples
SketchUp Ruby API Tutorials and Examples. Contribute to SketchUp/sketchup-ruby-api-tutorials development by creating an account on GitHub.
GitHub (github.com)
The examples are commented so it is easy to see structure
This is a good example of a simple extension...
sketchup-ruby-api-tutorials/tutorials/01_hello_cube/tut_hello_cube.rb at main · SketchUp/sketchup-ruby-api-tutorials
SketchUp Ruby API Tutorials and Examples. Contribute to SketchUp/sketchup-ruby-api-tutorials development by creating an account on GitHub.
GitHub (github.com)
-
Thank you very much, this is exactly what I'm looking for !

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