Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
Sketchup Ruby

Sketchup Ruby

Ratings: (0)|Views: 465 |Likes:
Published by rajib71
This publication provides detailed information on Sketchup Ruby, an integrated scripting language in sketchup for improving the functionality of Sketchup
This publication provides detailed information on Sketchup Ruby, an integrated scripting language in sketchup for improving the functionality of Sketchup

More info:

Published by: rajib71 on Mar 19, 2010
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less





Keywords : SketchUp Ruby, Ruby Plugins, Ruby API, WebDialog Class, Ruby Observer Mechanism,Ruby Script
Sketchup Ruby
Ruby is an interpreted scripting language that SketchUp can understand via its SketchUp Rubyapplication programming interface (API). It was first introduced in SketchUp Version 4 with theintention to quick and easy object-oriented programming.With ruby script sketchup users can use to write plugins (scripts) for GoogleSketchUp and develop extra functionality by creating dozens of new tools & component generators for SketchUpbeyond its built-in abilities in the Ruby programming language.Ruby scripts can be any thing from short snippets of code to more elaborate tool development.
Benefits of Ruby
Produce custom
which boost up the modeling speed andprovide assistance to create complex objects with a few clicks.
Make 3d models that go ahead of geometry. The sketchup user can get the opportunityto add text or numeric attributes to any part of a SketchUp model and
The task of the SketchUp becomes automated with the API. It will be very helpful in thecase of repetitive modeling requirements as a script can save time and money to a greatextent.
Google produce free
the sketchup users are able to protect their IPand sell thier plugins to this extensive user base
Resources for learning Ruby
"Programming Ruby" online at
"The "Ruby user's guide" online at
"Introduction to Ruby" online at
"Learn to Program - A Tutorial for the Future Programmer" on line at
Bezier Splines in SketchUp Using Ruby Scripts athttp://www.aecbytes.com/tipsandtricks/2009/issue42-sketchup.html
Sketchup Ruby interference
Ruby Extensions
The Sketchup extension is similar to other ruby script. It is known as ‘.rb’ and is applied at the endof a file name. The sketchup users have to create few extra code calls to make it easier tomanage all of their rubies. To make use of plug-ins and other Ruby tools written by Google - likeSandbox and Dynamic Components - extensions must be enabled by clicking a checkbox under the SketchUp Preferences > Extensions menu.
SketchUp Ruby API
TheSketchUp Ruby API (Application Programmer's Interface) is a way that Ruby programmers can extend the capabilities of SketchUp to meet their needs. Create custom drawing tools, like atool for creating windows.This API documentation includes sample code for each SketchUp Ruby method. There is onesample code file, also known as test file, for each SketchUp Ruby class file. All of the samplecode is accessible in a .zip file on the SketchUp Web site (www.sketchup.com) under theDownloads tab. Unzip the test files in the Plugins folder within the SketchUp installation directory.These files end in the word “Tests,” such as “EdgeTests”.You should check each test file using a text editor. You may also accomplish the tests to makeout how each API works within SketchUp.The Ruby API presents a binding to the TET C API. The API functionalities are included in asingle Ruby module called as ‘Rbtet’. This module will have to be imported at the start of the testcode require “Rbtet”The SketchUpRuby API contains a series of SketchUp-specific Ruby modules known as classes in the object-oriented programming (OOP) world, and corresponding commands known asmethods in the OOP world. These modules are utilized for formulating macros and controllinggeometry in SketchUp. Classes are considered to be a mechanism for grouping related SketchUpruby commands.
Advantages with Ruby API
Attach attributes to drawing elements such as cost, supplier, etc.
Read attributes to generate reports, cut lists, or bills of material.
Automate common tasks like generating scenes from a set of rotations.
Animate stuff, from drawing elements to camera position.
Make games inside SketchUp by combining these activities.
Ruby Plugin
In the SketchUp world, "plugins" are identical to ruby scripts. Scripts belong to text files with a .rb(ruby) or .rbs
extension that includes Ruby programming code
WebDialog Class
The Ruby WebDialog class supports DHTML webdialogs created with JavaScript. As for instancewebdialogs can be formed from Ruby code to exhibit a web site or to recognize user input andutilize the results in your Ruby code.
Ruby Observer Mechanism
If any changes occur in the object of SketchUp application or model, it can be notified to Rubyscript with the help of Ruby Observer Mechanism. For instance, an observer class can be createdthat "listens" to when SketchUp leaves and then makes some action.Make a Ruby class of an exact observer type, like AppObserver, prevail the desired methods,such as onQuit, and put in an example of the observer to the related objects in your Ruby script(applying the addobserver method for that object). Refer to individual observer edges for additional information.

Activity (10)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
kthuyhn liked this
bitbucket88 liked this
Dane Watkins liked this
rceniza liked this
Jayson Orosa liked this
marian123marian liked this
eduardo chua liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->