• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Ruby Console Ruby Console

Scheduled Pinned Locked Moved Developers' Forum
19 Posts 7 Posters 2.7k 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.
  • T Offline
    todd burch
    last edited by 20 Mar 2008, 23:22

    Thanks TIG. I was working from failing memory.

    1 Reply Last reply Reply Quote 0
    • S Offline
      SchreiberBike
      last edited by 21 Mar 2008, 04:39

      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 21 Mar 2008, 10:15

        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 22 Mar 2008, 21:33

          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
          • G Offline
            Gaieus
            last edited by 22 Mar 2008, 21:38

            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 22 Mar 2008, 21:54

              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 22 Mar 2008, 22:21

                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 23 Mar 2008, 01:27

                  It's making me curious.

                  Hi

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    ryan_allan
                    last edited by 13 Apr 2008, 22:12

                    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 14 Apr 2008, 03:00

                      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 17 Apr 2008, 01:55

                        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