It is currently Thu Sep 02, 2010 9:55 pm

Registration
Login Help

Advertise Here

SketchUp-Ruby Resources

FAQMembersRegisterLogin

SketchUp-Ruby Resources

Postby Jim on Sat May 31, 2008 6:02 pm

Official Google Sketchup API Documentation


Ruby Operator Precedence

The reserved words and, or and not 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

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.

Code: Select all
Sketchup.find_support_file("Plugins")


Image

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.



SketchUp & Ruby Development Discussions


Ruby Editor Suggestions


Ruby Challenges

  1. UI.play_sound jukebox (RickW)
  2. best fitting bounding box (Matt)

Ruby Docs


Ruby Books



Extension Collections


Resources

I probably over-simplified that.
sketchup plugins & news blog
Jim
 
Posts: 2876
Joined: Mon Nov 12, 2007 10:13 pm
Name: Jim Foltz
Operating system: XP Pro SP3
SketchUp version: Google Pro 8.0

Re: SketchUp-Ruby Resources

Postby Heven7_floor on Tue Jan 20, 2009 10:14 am

Great Jim

Your suggestion is usefully to every newer like me .

Thanks :bounce:
User avatar
Heven7_floor
 
Posts: 26
Joined: Thu Mar 27, 2008 4:09 pm
Location: Beautiful Sea
Name: PCT
Operating system: XP
SketchUp version: SU 6

Re: SketchUp-Ruby Resources

Postby watkins on Tue Jan 20, 2009 1:23 pm

Dear Jim,


Many thanks for all your hard work. It is greatly appreciated.

Kind regards,
Bob
watkins
 
Posts: 1059
Joined: Wed Nov 14, 2007 5:47 pm

Re: SketchUp-Ruby Resources

Postby sepo on Fri Jan 23, 2009 8:10 pm

Just found this depository of Plugins for SU. There a lot of known ones but nevertheless mayby useful.
http://www.accustudio.com/index.php?opt ... lect&id=23
User avatar
sepo
 
Posts: 1215
Joined: Wed Nov 14, 2007 1:19 pm
Location: Northampton UK

Re: SketchUp-Ruby Resources

Postby OAHT on Tue Feb 10, 2009 11:10 am

Thanks for your effort. Cheers :thumb:
User avatar
OAHT
 
Posts: 3
Joined: Fri Apr 11, 2008 4:21 pm
Operating system: Windows XP
SketchUp version: 6.0

Re: SketchUp-Ruby Resources

Postby vashstamp3de on Sun May 17, 2009 1:30 pm

I hope this helps...(and not violating someone :( )


http://xoomer.virgilio.it/kites/program ... ugins.html


Good Luck!
vashstamp3de
 
Posts: 3
Joined: Wed Apr 29, 2009 10:34 am
Name: john
Operating system: windows
SketchUp version: version 7

Re: SketchUp-Ruby Resources

Postby remus on Sun May 17, 2009 5:59 pm

I imagine a link to contact each plugins developer would be appreciated by the authors :thumb:
User avatar
remus
Global Moderator
 
Posts: 7995
Joined: Fri Nov 30, 2007 8:48 am
Location: UK
Name: remus
Operating system: vista
SketchUp version: 7.whatever

Re: SketchUp-Ruby Resources

Postby Pauline01 on Mon Oct 12, 2009 2:01 pm

thx again it's very very nice!
Pauline01
 
Posts: 45
Joined: Mon Oct 12, 2009 1:11 pm
Name: Pauline
Operating system: windows
SketchUp version: 7 pro

Re: SketchUp-Ruby Resources

Postby Align on Sun Nov 08, 2009 4:15 am

thanx for this awesome thread! i give it a 10 :sketchstatic:
Align
 
Posts: 29
Joined: Mon Oct 26, 2009 3:09 pm
Operating system: Vista Home Premium
SketchUp version: 7.1

Re: SketchUp-Ruby Resources

Postby thomthom on Sun Nov 08, 2009 11:44 am

Jim, maybe include the path to install plugins on Mac as well. That one seem to be the most confusing amongst users it seems.
Thomas Thomassen — SketchUp Monkey
My Plugins
User avatar
thomthom
Global Moderator
 
Posts: 8353
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: Thomas Thomassen
Operating system: Windows7/Vista/XP/OSX10.4/10.5
SketchUp version: 6.4&7.1&8 Pro

Re: SketchUp-Ruby Resources

Postby RickW on Mon Jan 11, 2010 10:27 pm

vashstamp3de wrote:I hope this helps...(and not violating someone :( )
http://xoomer.virgilio.it/kites/program ... ugins.html
Good Luck!

Just point the Windowizer link to Smustard, please. It currently points to a broken link on RLD.
RickW
 
Posts: 745
Joined: Fri Nov 16, 2007 6:38 am
Location: Wichita, KS
Name: Rick Wilson
Operating system: WinXP
SketchUp version: >2

Re: SketchUp-Ruby Resources

Postby thomthom on Sun May 09, 2010 4:29 pm

Might be worth noting that definition names can't be trusted to be unique: viewtopic.php?f=11&t=28094
Thomas Thomassen — SketchUp Monkey
My Plugins
User avatar
thomthom
Global Moderator
 
Posts: 8353
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: Thomas Thomassen
Operating system: Windows7/Vista/XP/OSX10.4/10.5
SketchUp version: 6.4&7.1&8 Pro

RUBY PROGRAMMING REFERENCES

Postby Dan Rathbun on Thu Aug 26, 2010 10:53 pm


RUBY PROGRAMMING REFERENCES - CHM format*
Method References for Ruby Core and Extended Modules & Classes
~ Arranged by Ruby version and PatchLevel ~ Choose from 7z or Zip archive formats. ~

Ruby ver 1.8.6 p398
ruby-1.8.6-p398-doc-chm-2.7z
ruby-1.8.6-p398-doc-chm-2.zip




* Compiled HTML Help Markup
You do not have the required permissions to view the files attached to this post.
_
User avatar
Dan Rathbun
 
Posts: 843
Joined: Tue Oct 06, 2009 3:06 am
Name: Dan Rathbun
Operating system: WinXP / SuSe Linux 11+
SketchUp version: 7+

SketchUcation One-Liner Adverts

by Ad Machine on 5 minutes ago

3DVinci - Step-by-step SketchUp tutorials. Learn by Doing!
Ad Machine
Robot
 
Posts: 2010


 

Advertise Here

Who is online

Users browsing this forum: No registered users and 3 guests