Quantcast
  • We invite you to join UKWorkshop.
    Members can turn off viewing Ads!

Sketchup Resources

UKworkshop.co.uk

Help Support UKworkshop.co.uk:

Chris Knight

Established Member
Joined
14 Jan 2004
Messages
6,641
Reaction score
3
Location
SE London - NW Kent

Steve Maskery

Established Member
Joined
26 Apr 2004
Messages
11,799
Reaction score
138
Location
Kirkby-in-Ashfield
Excellent Chris, thanks. I notice there is one for doing Bezier curves, I'll definitely have a look at that.

Cheers
Steve
 

tim

Established Member
Joined
5 Nov 2004
Messages
2,307
Reaction score
0
Location
Herefordshire
Thanks for this Chris.

Really useful.

What do you do with the ruby files when downloaded? The Ruby help button doesn't show anything at all!? I have looked at the ruby site as directed by Sketchup help but its basically goobledegook to me. Do I need to be able to program/ undersatnd programming to use these files?


edit: okay think I've found out now - hadn't restarted Sketchup after moving the files into the plug in directory.

Cheers

Tim
 

Chris Knight

Established Member
Joined
14 Jan 2004
Messages
6,641
Reaction score
3
Location
SE London - NW Kent
Tim,

You need to start the Ruby Console (Menu: Window/Ruby Console) then type load'filepath/name'. It is spelt out in the separate Ruby Help section (Menu: Help/Ruby Help).

Depending on the file, you will then find it pops up in a variety of places. The example given in the Ruby Help shows up in the Camera menu for some reason and the cab.rb file shows up under the Plugins menu (which itself only appears after you load a Ruby file).

To add to this confusion, the Ruby Help file istelf is a little out of date and talks of the View menu when it means the Window menu!
 

tim

Established Member
Joined
5 Nov 2004
Messages
2,307
Reaction score
0
Location
Herefordshire
Thanks Chris.

Chris":9ufh1v7t said:
It is spelt out in the separate Ruby Help section (Menu: Help/Ruby Help).
As I said:

Tim":9ufh1v7t said:
The Ruby help button doesn't show anything at all!?
When I click on Ruby Help, nothing happens at all - just get a 'done' written bottom left, no new window, nothing. Can't understand why. Any thoughts? :-k


Cheers

Tim
 

wizer

Established Member
Joined
3 Mar 2005
Messages
15,589
Reaction score
0
thanks for this Chris, something else to do whilst at work tomorrow *ahem* :wink:
 

Philly

Established Member
Joined
24 Nov 2003
Messages
6,874
Reaction score
0
Location
Dorset, England.
Chris
Many thanks for posting these-very helpful!
The more I use Sketchup the more I love it-so easy to visualise what you are going to make. Makes life a lot easier when making things for other people as you can print out lovely 3D images for final approval.
Cheers
Philly :D
 

SketchUp Guru

Established Member
Joined
12 Apr 2005
Messages
3,152
Reaction score
0
Location
Rochester, MN USA
re: Ruby Scripts. If you are using a PC, put the scripts into the Plugins folder under SketchUp4.0. Also, look in the examples folder inside the plugins folder. Copy sketch.rb from the examples folder out into the Plugins folder. When you open SU, you should now have a menu called Plugins.

Most Ruby scripts will be accessed through the Plugins menu although some are accessed in the context menu (right click) and some are in other menus. You can find out where they are set to be accessed from by looking at the end of the script.

For example here is a very simple script whichopens the calculator in Windows from SketchUp.

require 'sketchup.rb'

# -----------------------------------------------------------------------------


# Add item "calculator" to the Draw menu.
# First check for existing menu load
if( not file_loaded?("calc.rb") )

UI.menu("Plugins").add_item("Calculator") { UI.openURL("calc.exe") }

end

# -----------------------------------------------------------------------------
file_loaded("calc.rb")

In the line "UI.menu("Plugins").... it tells SketchUp to put the word Calculator in the Plugins menu and run calc.exe when it is selected from the menu. If you were to change "Plugins" to "Tools" you would find Calculator in the Tools menu.

FWIW, if you want this script, copy all of it from the line "require 'sketchup.rb'" to "file_loaded("calc.rb")" inclusive and paste it into an blank WordPad or Notepad file. Save it as calc.rb (If it won't let you append the rb extension, rename the file after saving it). Save it in the Plugins folder in SketchUp.
 
Top