SketchUp-Ruby Resources
-
Official Google Sketchup API Documentation
- SketchUp API Blog
- Google SketchUp API Home (Google Code)
- Google SketchUp Developers Group (Google Groups)
- Google SketchUp API Documentation (Reference)
Ruby Operator Precedence
The reserved words
and
,or
andnot
have a lower precedence than&&
,||
and!
. The tricky part is that their precedence is lower than the assignment operator=
.a = false or true
evalualtes to (a = false) or true
.
You probably meant one of:
a = (false or true)
a = false || true
Avoid using the typename method
In this discussion, user AlexMozg presents evidence that avoiding the
object.typename
can give your script a considerable performance increase.Instead, use
object.is_a? Class::Type
.He also says in a model that is less than 10 MB, there may not be a substantial increase, but for very large models the speed increase is considerable.
Installing Extensions
- How to find the Plugins folder?
Here's a method that tells you right where your version of SketchUp is looking for extensions. Copy and paste the code into the Window > Ruby Console dialog, and press ENTER. It works for all versions of SketchUp, and on all operating systems, too.
Sketchup.find_support_file("Plugins")
And in my case the location to install plugins is
C:/Program Files/Google/Google SketchUp 7/Plugins
Links to important and notable Dev Forum posts past and present. Let me know if there is a topic that should be included here.
-
How to enable thumbnail preview (windows)
-
Google SketchUp Ruby API - What's New in SketchUp 7.1
-
WebDialogs - The Lost Manual -- thomthom (Nov 2009)
-
Report Ruby Bugs and Documentation issues in this thread. The SketchUp developers are aware of, and read it.
-
[Code] Real UV from UVHelper data - thomthom (Oct 2009)
-
[url=http://forums.sketchucation.com/viewtopic.php?f=180&t=13666:3tvu9trw]SketchUp RUBY API Wishlist (way of coding wishes, please)[/url:3tvu9trw]
-
WebDialogs: [url=http://forums.sketchucation.com/viewtopic.php?f=180&t=22491:3tvu9trw]How to Hide the Scrollbars[/url:3tvu9trw]
-
[url=http://forums.sketchucation.com/viewtopic.php?f=180&t=10142:3tvu9trw]SketchUp-Ruby Resources[/url:3tvu9trw]
-
[url=http://forums.sketchucation.com/viewtopic.php?f=180&t=16909:3tvu9trw]Must Have Ruby Plugins - Visual Index[/url:3tvu9trw]
-
[url=http://forums.sketchucation.com/viewtopic.php?f=180&t=16792:3tvu9trw]< SCF Toolbars Authors >[/url:3tvu9trw]
-
[url=http://forums.sketchucation.com/viewtopic.php?f=180&t=16164:3tvu9trw]Collaborative Effort - Ruby Template, RDoc, and Localization[/url:3tvu9trw]
-
[url=http://forums.sketchucation.com/viewtopic.php?f=180&t=12423:3tvu9trw]Word of warning to developers[/url:3tvu9trw]
-
[url=http://forums.sketchucation.com/search.php?keywords=code&terms=all&author=&fid=180&sc=1&sf=titleonly&sr=topics&sk=t&sd=d&st=0&ch=300&t=0&submit=Search:3tvu9trw]Ruby Forum Code Search[/url:3tvu9trw]
SketchUp & Ruby Development Discussions
- Rick's [url=http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=12423:3tvu9trw]Words of Warning[/url:3tvu9trw] - Important points to remember for writing plugins.
- [url=http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=8997&start=0&st=0&sk=t&sd=a:3tvu9trw]How do you make plug-ins for sketchup[/url:3tvu9trw]
- [url=http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=6818:3tvu9trw]What is needed to script?[/url:3tvu9trw]
- [url=http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=4796:3tvu9trw]ruby dev environment[/url:3tvu9trw]
- [url=http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=11160:3tvu9trw]Creating an API[/url:3tvu9trw]
- [url=http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=12633:3tvu9trw]$ versus @[/url:3tvu9trw]
- [url=http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=14608:3tvu9trw]Manipulating the InputPoint[/url:3tvu9trw]
Ruby Editor Suggestions
-
[url=http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=13206:3tvu9trw]ConTEXT[/url:3tvu9trw] Editor w/Ruby Highlighting
-
[url=http://www.sketchucation.com/forums/scf/viewtopic.php?f=169&t=6903:3tvu9trw]Notepad++[/url:3tvu9trw] editor
-
Notepad++ AutoComplete files
- by [url=http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=15875&p=123500:3tvu9trw]Didier Bur[/url:3tvu9trw]
- by [url=http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=4796&p=25556#p111076:3tvu9trw]radhikari[/url:3tvu9trw]
-
[url=http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=13574&p=101153#p101153:3tvu9trw]EditPlus[/url:3tvu9trw] editor
-
RDE
Ruby Challenges
- [url=http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=2107:3tvu9trw]UI.play_sound jukebox[/url:3tvu9trw] (RickW)
- [url=http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=13715:3tvu9trw]best fitting bounding box[/url:3tvu9trw] (Matt)
Ruby Docs
-
[url=http://ruby-doc.org/:3tvu9trw]Ruby-doc.org[/url:3tvu9trw]
-
[url=http://www.ruby-doc.org/core/classes/Array.html:3tvu9trw]Arrays[/url:3tvu9trw]
-
[url=http://www.ruby-doc.org/core/classes/String.html:3tvu9trw]Strings[/url:3tvu9trw]
-
[url=http://www.ruby-doc.org/core/classes/Hash.html:3tvu9trw]Hashes[/url:3tvu9trw]
-
[url=http://www.ruby-doc.org/core/classes/Enumerable.html:3tvu9trw]Enumerable (module)[/url:3tvu9trw]
-
[url=http://www.ruby-doc.org/core/classes/IO.html:3tvu9trw]IO[/url:3tvu9trw]
-
[url=http://www.ruby-doc.org/core/classes/Time.html:3tvu9trw]Time[/url:3tvu9trw]
Ruby Books
- [url=http://www.autosketchup.com/:3tvu9trw]Automatic Sketchup[/url:3tvu9trw]
- [url=http://rubybestpractices.com/:3tvu9trw]Ruby Best Practices[/url:3tvu9trw]
- [url=http://www.sapphiresteel.com/The-Book-Of-Ruby:3tvu9trw]The Book of Ruby[/url:3tvu9trw]
Extension Collections
- [url=http://www.smustard.com/:3tvu9trw]Smustard(TM) - the Companion to Sketchup(TM)[/url:3tvu9trw]
- [url=http://www.crai.archi.fr/RubyLibraryDepot/Ruby/RUBY_Library_Depot.htm:3tvu9trw]Ruby Library Depot[/url:3tvu9trw] Here are the contributions of the Ruby developers of the SketchUp community since 2004.
- [url=http://www.pixero.com/:3tvu9trw]Jan Sandström[/url:3tvu9trw] (Pixero)
- [url=http://www.tensile-structures.de/index.html:3tvu9trw]Soap Skin & Bubble[/url:3tvu9trw]
- [url=http://errorinitus.de:3tvu9trw]Mario Pehle[/url:3tvu9trw] (azuby) under Software
- [url=http://www.accustudio.com/index.php?option=com_remository&Itemid=88&func=select&id=23:3tvu9trw]Accustudio File Repository[/url:3tvu9trw] - appears to mirror the Ruby Library Depot.
- [url=http://sketchuptips.blogspot.com/:3tvu9trw]SketchUp Plugins Blog[/url:3tvu9trw]
Resources
- [url=http://forums.sketchucation.com/viewtopic.php?f=180&t=26352:3tvu9trw]Ruby Scrambler Download[/url:3tvu9trw]
-
Great Jim
Your suggestion is usefully to every newer like me .
Thanks
-
Dear Jim,
Many thanks for all your hard work. It is greatly appreciated.
Kind regards,
Bob -
Just found this depository of Plugins for SU. There a lot of known ones but nevertheless mayby useful.
http://www.accustudio.com/index.php?option=com_remository&Itemid=88&func=select&id=23 -
Thanks for your effort. Cheers
-
I hope this helps...(and not violating someone )
http://xoomer.virgilio.it/kites/programmi/grafica/sketcplugins.html
Good Luck!
-
I imagine a link to contact each plugins developer would be appreciated by the authors
-
thx again it's very very nice!
-
thanx for this awesome thread! i give it a 10
-
Jim, maybe include the path to install plugins on Mac as well. That one seem to be the most confusing amongst users it seems.
-
@vashstamp3de said:
I hope this helps...(and not violating someone )
http://xoomer.virgilio.it/kites/programmi/grafica/sketcplugins.html
Good Luck!Just point the Windowizer link to Smustard, please. It currently points to a broken link on RLD.
-
Might be worth noting that definition names can't be trusted to be unique: http://forums.sketchucation.com/viewtopic.php?f=11&t=28094
-
Very nice list Dan!
@dan rathbun said:
Ruby Best Practices, by Gregory T. Brown
** PDF
http://sandal.github.com/rbp-book/pdfs/rbp_1-0.pdfThis one looks very interesting.
-
@thomthom said:
Very nice list Dan!
Thanks.. (but I didn't find all these myself.) I had it posted over at GG, but it kept getting farther down the topic stack. Over here I know right where it is, and can format it.
@thomthom said:
This one looks very interesting.
Jim found that one.
P.S. - @Jim your free to cut and paste anything from here to the top of the thread.
-
UPDATES / ADDITIONS (in this topic.)
Edited Instructions to be more clear and precise.
Added DLL for:
- latest Ruby v 1.8.7 p330
RUBY PROGRAMMING REFERENCES - CHM format
Added CHMs for:
- latest Ruby v 1.8.7 p330* latest Ruby v 1.9.2 p136
-
This site has many videos of Ruby talks recorded at various Ruby Conferences - http://confreaks.net
Some good stuff there - if you can find them...
-
Hello,
Where to find the .h file of msvcrt-ruby18.dll file ?
Regards,
-
@rricon said:
Where to find the .h file of msvcrt-ruby18.dll file ?
In the source:
ftp;//ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p287.zip -
book: "Programming Ruby - The Pragmatic Programmer's Guide"
Copyright 2000 Addison Wesley Longman, Inc.ProgrammingRuby.zip
Released under the terms of the Open Publication License V1.0. -
Chunky Bacon. I didn't see a link for Why's Poignant Guide to Ruby. A true classic.
http://mislav.uniqpath.com/poignant-guide/book/chapter-1.html
Advertisement