• Login
sketchucation logo sketchucation
  • Login
๐Ÿค‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

[Plugin] Ruby Toolbar

Scheduled Pinned Locked Moved Plugins
41 Posts 15 Posters 33.8k Views 15 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.
  • D Offline
    Didier Bur
    last edited by 19 Nov 2007, 05:05

    Cool ๐Ÿ˜†
    very VERY VERY useful tool,
    Thanks a lot from all the developers !

    hem hem ๐Ÿ˜ฎ ๐Ÿ˜ณ where's the gem ? (didn't find it at Sketchy Endeavors ๐Ÿ˜  )

    DB

    1 Reply Last reply Reply Quote 0
    • T Offline
      tomasz
      last edited by 19 Nov 2007, 05:07

      Jim,

      Am I blind already? Description of your tool is so interesting ... but where is the link ๐Ÿ˜†
      Thanks a lot!

      Tomasz

      Author of [Thea Render for SketchUp](http://www.thearender.com/sketchup)

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jim
        last edited by 19 Nov 2007, 05:08

        Oops, that was a major omission. I've added the attachment to the original post.

        Hi

        1 Reply Last reply Reply Quote 0
        • N Offline
          not registered yet
          last edited by 19 Nov 2007, 05:10

          When I extracted your .zip file, KI restarted SketchUp and I`can't find it!!! Will you please Bugfix it?

          [Invader ZIM]

          1 Reply Last reply Reply Quote 0
          • J Offline
            juju
            last edited by 19 Nov 2007, 05:10

            ZIM - some toolbars need to be activated under the "view" menu. Have a look to see if this is the case.

            Save the Earth, it's the only planet with chocolate.

            1 Reply Last reply Reply Quote 0
            • D Offline
              Didier Bur
              last edited by 19 Nov 2007, 05:11

              Jim,
              I'm having the "blank icons syndrom" (all png's are in Plugins folder)
              The line that seems to cause the problem is:

              imgdir = File.join(File.dirname(FILE), File.basename(FILE, ".rb"))

              It returns: ./(eval)
              then the icon file location File.join(imgdir, "rubypanel.png") returns: ./(eval)/rubypanel.png

              Please help !

              The 'toggle' method doesn't work also. ๐Ÿ˜  At least in V5.
              Question: Is findWindow.call(0,"Ruby Console") rely on language settings of SU ? I mean is "Ruby Console" available just for english versions of SU ? In this case the win32api call will not work with other platforms.

              P.S.:

              UI.openURL("c;\\program files\\google\\google sketchup 6\\plugins")
              

              A non hard-coded command would be handy. Why not get this path from the registry ? Or something like:

              su_ver = Sketchup.version.split(".")[0].to_i
              if su_ver < 6
              devdir = File.dirname(Sketchup.find_support_file("sketchup.exe")) + "\Plugins"
              else
              devdir = ...
              end

              This makes the command compatible for SU5 and 6 (I guess), no matter where the user has installed SU.

              Regards,

              DB

              1 Reply Last reply Reply Quote 0
              • J Offline
                Jim
                last edited by 19 Nov 2007, 05:12

                @didier bur said:

                Jim,
                I'm having the "blank icons syndrom" (all png's are in Plugins folder)
                The line that seems to cause the problem is:

                imgdir = File.join(File.dirname(FILE), File.basename(FILE, ".rb"))

                It returns: ./(eval)
                then the icon file location File.join(imgdir, "rubypanel.png") returns: ./(eval)/rubypanel.png

                Please help !

                Didier, I'm, not sure why it works on my computer but not yours. I have updated the script to use a method that will hopefully be more robust. There should be a rubytoolbar folder in which the images are located.

                @didier bur said:

                The 'toggle' method doesn't work also. ๐Ÿ˜  At least in V5.
                Question: Is findWindow.call(0,"Ruby Console") rely on language settings of SU ? I mean is "Ruby Console" available just for english versions of SU ? In this case the win32api call will not work with other platforms.

                This could very well be the case. If you have Ruby installed, you could try your local verion of Win32API.so located in C:\ruby\lib\ruby\1.8\i386-mswin32\Win32API.so.

                What is the title text of your Ruby Console window? Is it English "Ruby Console", or maybe French? I think findWindow is using the name of the window.

                @didier bur said:

                P.S.:

                UI.openURL("c;\\program files\\google\\google sketchup 6\\plugins")
                

                A non hard-coded command would be handy. Why not get this path from the registry ? Or something like:

                su_ver = Sketchup.version.split(".")[0].to_i
                if su_ver < 6
                devdir = File.dirname(Sketchup.find_support_file("sketchup.exe")) + "\Plugins"
                else
                devdir = ...
                end
                This makes the command compatible for SU5 and 6 (I guess), no matter where the user has installed SU.

                I use the find_support_file method; good idea.

                Thank you for the report, and your patience. Please download and try the updates.

                Hi

                1 Reply Last reply Reply Quote 0
                • D Offline
                  Didier Bur
                  last edited by 19 Nov 2007, 05:13

                  Hi Jim,
                  Thanks for the update: icons are there now ๐Ÿ˜„

                  Show/Hide console doesn't work ๐Ÿ˜• (not very important)
                  Clear console only moves the text in the console 1 line up 8O

                  The title of the Ruby console window in french is "Console Ruby". This could cause the problem...
                  But the most important command "Reload script" works OK since the first version ๐Ÿ˜›

                  Thanks again for this very useful tool,
                  Regards,

                  DB

                  1 Reply Last reply Reply Quote 0
                  • GaieusG Offline
                    Gaieus
                    last edited by 19 Nov 2007, 05:13

                    @didier bur said:

                    ...The title of the Ruby console window in french is "Console Ruby". This could cause the problem...

                    Thank God I don't need to deal with a "native" version of SU! ๐Ÿ˜„

                    Gai...

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      Didier Bur
                      last edited by 19 Nov 2007, 05:14

                      Everything's OK with the french version now, including toggle
                      Only minor tweaks were necessary ๐Ÿ˜†

                      DB

                      1 Reply Last reply Reply Quote 0
                      • J Offline
                        Jim
                        last edited by 19 Nov 2007, 05:15

                        @didier bur said:

                        Everything's OK with the french version now, including toggle
                        Only minor tweaks were necessary ๐Ÿ˜†

                        Great! But would you mind sharing the minor tweaks so maybe I can make the toolbar more international?

                        Hi

                        1 Reply Last reply Reply Quote 0
                        • D Offline
                          Didier Bur
                          last edited by 19 Nov 2007, 05:15

                          Hi Jim,

                          @unknownuser said:

                          would you mind sharing the minor tweaks

                          I'm afraid it would be useless because I simply replaced all the calls to "Ruby Console" by "Console Ruby", but that's only for french. Each version of SU does have a particular name for the Ruby Console, so... Even a call to langhandler.rb (with 'getstring') will not work since this deals with a window name, not a message string or such. ๐Ÿ˜ž

                          Regards,

                          DB

                          1 Reply Last reply Reply Quote 0
                          • J Offline
                            Jim
                            last edited by 19 Nov 2007, 05:16

                            @didier bur said:

                            Hi Jim,

                            @unknownuser said:

                            would you mind sharing the minor tweaks

                            I'm afraid it would be useless because I simply replaced all the calls to "Ruby Console" by "Console Ruby", but that's only for french. Each version of SU does have a particular name for the Ruby Console, so... Even a call to langhandler.rb (with 'getstring') will not work since this deals with a window name, not a message string or such. ๐Ÿ˜ž

                            Regards,

                            Didier, GetString would work, but since it's only one string, I won't use LangHandler. I've updated the plugin to support FR.

                            Hi

                            1 Reply Last reply Reply Quote 0
                            • C Offline
                              CPhillips
                              last edited by 19 Nov 2007, 05:17

                              Hi Jim,

                              I love this toolbar. I use it constantly.

                              Feature request: How about saving the state and position of the console in the registry? So if I close and reopen Sketchup it remembers if the console was open and where it was.

                              Also If you want I could give you the code to read the console log window. Saving is the only use I can think of. But maybe it could be parsed to some effect.

                              Chris

                              1 Reply Last reply Reply Quote 0
                              • J Offline
                                Jim
                                last edited by 19 Nov 2007, 05:18

                                Thanks Chris,

                                The version I posted on SketchyUtils isn't up-to-date, I'll remove it. Download the version available in this thread.

                                The position and size are saved in the registry, but only if the console is closed using the toolbar. Is it possible to save these settings if the console is closed using the X widget?

                                Hi

                                1 Reply Last reply Reply Quote 0
                                • C Offline
                                  CPhillips
                                  last edited by 19 Nov 2007, 05:18

                                  Ah, much better. Yeah I was still using the old one.

                                  I didn't even know this subsection of the forums was here until yesterday.

                                  As far as detecting the window close message. It wouldn't be easy. One thing you could do is just check the position of the window ever 10 sec or so and see if it has moved/closed.

                                  Regards
                                  Chris

                                  1 Reply Last reply Reply Quote 0
                                  • pilouP Offline
                                    pilou
                                    last edited by 4 Jul 2009, 14:31

                                    Why put the "ruby console" and not the "Web Console" of Jim Foltz?
                                    Seems it is more easy using? ๐Ÿ˜„
                                    (but I am totally new beginner in Ruby script ๐Ÿ’š

                                    PS With the Webconsole seems you can't save (bug ?) ๐Ÿ˜ฎ

                                    Frenchy Pilou
                                    Is beautiful that please without concept!
                                    My Little site :)

                                    1 Reply Last reply Reply Quote 0
                                    • B Offline
                                      BTM
                                      last edited by 4 Jul 2009, 14:57

                                      @unknownuser said:

                                      Why put the "ruby console" and not the "Web Console" of Jim Foltz?
                                      Seems it is more easy using? ๐Ÿ˜„
                                      (but I am totally new beginner in Ruby script ๐Ÿ’š

                                      PS With the Webconsole seems you can't save (bug ?) ๐Ÿ˜ฎ

                                      You can save, it just doesn't say that you have the same file open after that. it's weird.

                                      1 Reply Last reply Reply Quote 0
                                      • J Offline
                                        Jim
                                        last edited by 4 Jul 2009, 16:37

                                        Maybe I should combine the 2 plugins into 1?

                                        Hi

                                        1 Reply Last reply Reply Quote 0
                                        • T Offline
                                          tomasz
                                          last edited by 4 Jul 2009, 18:58

                                          @jim said:

                                          Maybe I should combine the 2 plugins into 1?

                                          Jim,
                                          I use your plugin always when I deal with SU Ruby. Ability to run snippets would be the good addition.

                                          I have also noticed that your plugin doesn't work in Polish version of SU. In PL the console is called "Konsola Ruby". Is there a way to recognise the language of SU instead of the OS? I have SU6PL installed in Vista EN. ๐Ÿ˜„

                                          Thanks
                                          Tomasz

                                          Author of [Thea Render for SketchUp](http://www.thearender.com/sketchup)

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

                                          Advertisement