sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    πŸ«› Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download

    Ruby Console Ruby Console

    Scheduled Pinned Locked Moved Developers' Forum
    19 Posts 7 Posters 2.8k Views 7 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.
    • S Offline
      SchreiberBike
      last edited by

      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()
      end

      but 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:")
      end

      Commenting that out got rid of both copies, but I do want one of them.

      1 Reply Last reply Reply Quote 0
      • T Offline
        todd burch
        last edited by

        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

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

          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.

          1 Reply Last reply Reply Quote 0
          • GaieusG Offline
            Gaieus
            last edited by

            John,

            Do you have the sketchup.rb in your plugins folder? And what's the file size?

            Gai...

            1 Reply Last reply Reply Quote 0
            • T Offline
              todd burch
              last edited by

              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

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

                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.

                1 Reply Last reply Reply Quote 0
                • J Offline
                  Jim
                  last edited by

                  It's making me curious.

                  Hi

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    ryan_allan
                    last edited by

                    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.

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      todd burch
                      last edited by

                      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

                      1 Reply Last reply Reply Quote 0
                      • R Offline
                        ryan_allan
                        last edited by

                        Well, sorry for replicating an already known bug... on the upside, now I fixed the same bug in my own code. Thanks Todd!

                        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