Ruby Console Ruby Console
-
Ah, that's it. Thanks, Todd.
-
I have the same problem (2x ruby console entries below each other), however I don't have a sketchup.rb file in the plugins folder.
-
There's another script out there that is errant.
It issues a "sendAction" to display the console, just as if you clicked on the dropdown choice. Search you plugins folder for any script that mentions "console" and you'll probably find it.
Once you find it, show us the code and we'll tell you how to comment it out.
Todd
-
I haven't been able to work it out yet. It's a small problem, so I haven't chased it too hard, but I tried your suggestions and didn't have any luck.
There's no extra sketchup.rb in Plugins.
I searched for "console" and found it in the comments of Examples.rb, utilitietools.rb and
examplescripts.rb.The ruby sketchup.rb has the word console as part of
@unknownuser said:if( not file_loaded? "sketchup.rb" )
Add a choice to the Window menu to display the Ruby console
add_separator_to_menu("Window")
UI.menu("Window").add_item($suStrings.GetString("Ruby Console")) do
Sketchup.send_action("showRubyPanel:")
endand
@unknownuser said:
require 'langhandler.rb'
$suStrings = LanguageHandler.new("gettingstarted.strings")
consoleThis file defines a number of useful utilities that are used by other
Ruby scripts.
Do you think it could be one of those?
-
Search for "showRubyPanel" in Plugins and Tools folders...
It's that name that's called. I accidentally left a call in ComponentReporter.rb about three years ago but all subsequent versions were fixed... Maybe it's something like that ?
-
Thanks TIG. I was working from failing memory.
-
Still not seeing single
(closest I could find to an emoticon seeing double)
In SketchyPhysics, I found
@unknownuser said:
if( not file_loaded?("SketchyPhysics.rb") )
#result = Sketchup.send_action "showRubyPanel:"reload()
endbut deleting that file and other references to SketchyPhysics didn't make any change.
I did find it in sketchup.rb in the tools directory
@unknownuser said:
Add some Ruby specific menu items
if( not file_loaded? "sketchup.rb" )
Add a choice to the Window menu to display the Ruby console
add_separator_to_menu("Window")
UI.menu("Window").add_item($suStrings.GetString("Ruby Console")) do
Sketchup.send_action("showRubyPanel:")
endCommenting that out got rid of both copies, but I do want one of them.
-
AHA! Perhaps you have a script that performs a LOAD of sketchup.rb instead of requiring it. Now search for "sketchup.rb" (a case insensitive search) and see what you come up with.
FYI - Any line of Ruby code that starts with a hash sign ("#") is a comment.
Todd
-
Still no luck. The only references to sketchup.rb are Require, except in the file sketchup.rb itself.
It's not bothering me much, but if I have time to spare, I'll uninstall SU and the rubys, then reinstall them and watch to see if and when the 2nd "ruby console" reappears.
-
John,
Do you have the sketchup.rb in your plugins folder? And what's the file size?
-
If you want, and you won't be breaking any licensing agreements, zip up up your /plugins folder and send it to me and I'll figure it out.
Todd
-
Gaieus, The only sketchup.rb I've got is in the /tools folder. It's 4K.
Todd, I'll live with it for now, unless it's making you curious, then I'll send it to you for you to play with.
-
It's making me curious.
-
Jim,
I'd like to say this is a Sketchup bug. I loaded Sketchup with an empty plugins folder, punched "require 'Sketchup.rb'" into the console window, and instantly had the second Ruby Console on the menu.
-
Ryan, that's because you typed "Sketchup.rb" with a capital "S". sketchup.rb does not perform a case insensitive compare when comparing script names. This has worked this way since June 2004, and was reported at least 2 years ago to @Last / Google, and a workaround even given too.
Todd
-
Well, sorry for replicating an already known bug... on the upside, now I fixed the same bug in my own code. Thanks Todd!
Advertisement