sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Exposing Ruby Code?

    Scheduled Pinned Locked Moved Developers' Forum
    4 Posts 3 Posters 250 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      matt.gordon320
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • S Offline
        slbaumgartner
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • Dan RathbunD Offline
          Dan Rathbun
          last edited by

          @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.

          I'm not here much anymore.

          1 Reply Last reply Reply Quote 0
          • M Offline
            matt.gordon320
            last edited by

            @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 😒

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Buy SketchPlus
            Buy SUbD
            Buy WrapR
            Buy eBook
            Buy Modelur
            Buy Vertex Tools
            Buy SketchCuisine
            Buy FormFonts

            Advertisement