Exposing Ruby Code?
-
Hi guys,
My apologies if there's already a post on this topic, I may not have found the right wording to find it. I'm looking to see if there is any way to work in SketchUp with the ruby console open, and have it display the code that runs when doing normal tasks. Maya does this with MEL, so when you move and object, it displays the transform information and the "underlying code" (If you can call it that).
I'd like to do this to help me learn Ruby. It's been a challenge so far with as little free time as I get, and thought this might be helpful. If it isn't possible with the way the API is set up, oh well.
Thanks!
Matt
-
No, alas, SketchUp does not provide a debugger or trace facility. If the Ruby code prints any output or raises any exceptions you will see them in the console, but nothing more. This has for a long time been the hardest part of developing plugins for SketchUp.
Steve
-
@matt.gordon320 said:
I'm looking to see if there is any way to work in SketchUp with the ruby console open, and have it display the code that runs when doing normal tasks.
The SketchUp engine that performs normal tasks, is written in C/C++, and compiled.
Ruby scripting is an "add on" to the SkecthUp application. You can actually run SketchUp with a command line switch, the does not load the Ruby interpreter.
-
@dan rathbun said:
The SketchUp engine that performs normal tasks, is written in C/C++, and compiled.
I was unaware of that, Dan, thanks for letting me know.
Ah well, back to feebly trying to wrap my brain around Ruby
Advertisement