This Windows-only plugin creates a Toolbar for controlling the Ruby Console. It is made with ruby script writers in mind.It can open and close the console, clear the console, load a ruby script, reload the last script, and browse the Plugins folder.
Updated Oct 19, 2008: Added "Ruby-Konsole" for my German friends.
Installation
- Download rubytoolbar.zip
- un-zip the archive to your Sketchup/Plugins folder, and re-start SketchUp.
14 comments:
there's something that does not work..
the hide function, after opening don't work and if I hit the clear buttom ùi get these messages in ruby console:
Error: # TypeError: no implicit conversion from nil to integer
C:/Programmi/Google/Google SketchUp 6/Plugins/rubytoolbar.rb:94:in `call'
C:/Programmi/Google/Google SketchUp 6/Plugins/rubytoolbar.rb:94:in `moveConsole'
C:/Programmi/Google/Google SketchUp 6/Plugins/rubytoolbar.rb:66:in `clearConsole'
C:/Programmi/Google/Google SketchUp 6/Plugins/rubytoolbar.rb:167
C:/Programmi/Google/Google SketchUp 6/Plugins/rubytoolbar.rb:167:in `call'
Massimo,
I suspect the name of the Ruby Console in your language is different than in my English version of SketchUp. For me, it's "Ruby Console". For French, it's "Console Ruby"
If you can send me the title of the Ruby Console (screenshot) I can add it to the plugin.
Also, this is a plugin for windows and won't work on a Mac.
Thanks so much for posting / writing this!!
Jiang
Hello Jim,
the same Error in the German version of SketchUp. Ruby Console called "Ruby-Konsole". Please add it to the plugin.
Thanks and greetings from the sunny side of Germany, called Hamburg
Ok, johann from Hamburg - I have added "Ruby-Konsole". Let me know if it works. Thanks for the report.
Hello Jim,
the hide function and the clear button don't work.
But when I change in Line 16 (when "DE" -> when "de") it works perfect.
Johann
Hy jim! nice job there! But I get an error when trying to clear console.
I use english language for SU.
below is the error.
Error: TypeError: no implicit conversion from nil to integer>
C:\Program Files\Google\Google SketchUp 6\Plugins\rubytoolbar.rb:96:in `call'
C:\Program Files\Google\Google SketchUp 6\Plugins\rubytoolbar.rb:96:in `moveConsole'
C:\Program Files\Google\Google SketchUp 6\Plugins\rubytoolbar.rb:68:in `clearConsole'
C:/Program Files/Google/Google SketchUp 6/Plugins/rubytoolbar.rb:175
C:/Program Files/Google/Google SketchUp 6/Plugins/rubytoolbar.rb:175:in `call'
newone, please copy and paste this line in the Ruby Console, and report back.
Sketchup.os_language
Also, what is the title of the Ruby Console window when open?
Sketchup.os_language
en-US
The title is "Ruby Console" so it should work normaly.
Now it's working and I haven't done anything(almost :P). I added a new when statement for en-US, but I deleted it... it was a stupid try... because you covered in else the "Ruby Console" case- Maybe some strange invisible character was in the line. This script is written on PC under XP?
But I noticed some strange behaviours...
If clear the console and I close it, when I reopen it, the text is still in console. It doesn't open a clear console.
The most interesting thing is that if I open the console fro Window menu it opens with its default size. If I use your button it opens rememberingt its last size (modified by user). So I'm wondering if that error is not related about registry reading... or some global variable. I took a quick look in your script but I couldn't find something strange. Anyway I'm a beginner in programming and ruby in special ;)
I also noticed the screen does not stay cleared, but the clearing is done by the win32api library. It's just the way it works and I never lokked into why.
In opening SketchUp, i got a window with the following message:
"Load Errors
Error Loading File rubytoolbar.rb
No such file to load - Win32API"
After searching, no win32Api on my computer. It is clear i have to install this library. I'm turning around on internet and i'm not sure of what i have to install.. Perhaps a little help from you dear Jim! Simon
never mind Jim,
I finally found by myself.
Everything is explained
"Here"
(i didn't know this "seem-to-be" excellent SU wiki )
And if you don't want to install the the entire Ruby system, you can find Win32API.so (last version i guess) Here:
Win32APi.so
Rubytoolbar.rb works well for me now!
:-)simonbonnet (SCF simonlebon)
Simon, I missed your post, or maybe just forgot about it... I checked and you are correct - I made a mistake and did not include win32api.so in the download. I will fix that now. Thanks for the report.