sketchucation logo sketchucation
    • 登入
    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!
    ⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update

    [Plugin] Ruby Toolbar

    已排程 已置頂 已鎖定 已移動 Plugins
    41 貼文 15 Posters 34.6k 瀏覽 15 Watching
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • Didier BurD 離線
      Didier Bur
      最後由 編輯

      Everything's OK with the french version now, including toggle
      Only minor tweaks were necessary 😆

      DB

      1 條回覆 最後回覆 回覆 引用 0
      • J 離線
        Jim
        最後由 編輯

        @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 條回覆 最後回覆 回覆 引用 0
        • Didier BurD 離線
          Didier Bur
          最後由 編輯

          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 條回覆 最後回覆 回覆 引用 0
          • J 離線
            Jim
            最後由 編輯

            @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 條回覆 最後回覆 回覆 引用 0
            • C 離線
              CPhillips
              最後由 編輯

              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 條回覆 最後回覆 回覆 引用 0
              • J 離線
                Jim
                最後由 編輯

                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 條回覆 最後回覆 回覆 引用 0
                • C 離線
                  CPhillips
                  最後由 編輯

                  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 條回覆 最後回覆 回覆 引用 0
                  • pilouP 離線
                    pilou
                    最後由 編輯

                    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 條回覆 最後回覆 回覆 引用 0
                    • B 離線
                      BTM
                      最後由 編輯

                      @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 條回覆 最後回覆 回覆 引用 0
                      • J 離線
                        Jim
                        最後由 編輯

                        Maybe I should combine the 2 plugins into 1?

                        Hi

                        1 條回覆 最後回覆 回覆 引用 0
                        • T 離線
                          tomasz
                          最後由 編輯

                          @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 條回覆 最後回覆 回覆 引用 0
                          • T 離線
                            tomasz
                            最後由 編輯

                            I have checked and

                            Sketchup.get_locale
                            

                            returns 'pl' string which is correct language for SU Version (SU6 PL).

                            Tomasz
                            EDIT
                            Substituted os_language with get_locale

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

                            1 條回覆 最後回覆 回覆 引用 0
                            • pilouP 離線
                              pilou
                              最後由 編輯

                              @btm
                              Thx Indeed that's save and load but not in .rb in the Snippets apparently 😄
                              That was my error 😄

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

                              1 條回覆 最後回覆 回覆 引用 0
                              • thomthomT 離線
                                thomthom
                                最後由 編輯

                                I'm getting this error for the Clear Console button:
                                Error: #<TypeError: no implicit conversion from nil to integer> C:/Program Files (x86)/Google/Google SketchUp 7/Plugins/rubytoolbar.rb:94:incall'
                                C:/Program Files (x86)/Google/Google SketchUp 7/Plugins/rubytoolbar.rb:94:in moveConsole' C:/Program Files (x86)/Google/Google SketchUp 7/Plugins/rubytoolbar.rb:66:in clearConsole'
                                C:/Program Files (x86)/Google/Google SketchUp 7/Plugins/rubytoolbar.rb:167
                                C:/Program Files (x86)/Google/Google SketchUp 7/Plugins/rubytoolbar.rb:167:in call'

                                Thomas Thomassen — SketchUp Monkey & Coding addict
                                List of my plugins and link to the CookieWare fund

                                1 條回覆 最後回覆 回覆 引用 0
                                • J 離線
                                  Jim
                                  最後由 編輯

                                  What is the name of your Ruby Console in the title bar?

                                  Hi

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • thomthomT 離線
                                    thomthom
                                    最後由 編輯

                                    "Ruby Console"

                                    Thomas Thomassen — SketchUp Monkey & Coding addict
                                    List of my plugins and link to the CookieWare fund

                                    1 條回覆 最後回覆 回覆 引用 0
                                    • J 離線
                                      Jim
                                      最後由 編輯

                                      I don't understand the error, then. Does WIn32API work on 64 bit machines? Can you try this version?


                                      rubytoolbar.zip

                                      Hi

                                      1 條回覆 最後回覆 回覆 引用 0
                                      • thomthomT 離線
                                        thomthom
                                        最後由 編輯

                                        @jim said:

                                        Does WIn32API work on 64 bit machines?

                                        Yes.
                                        I have a working version of a snippet that clears the console. I can compare it against the one in your plugin.

                                        @jim said:

                                        Can you try this version?

                                        I'll try.

                                        Thomas Thomassen — SketchUp Monkey & Coding addict
                                        List of my plugins and link to the CookieWare fund

                                        1 條回覆 最後回覆 回覆 引用 0
                                        • E 離線
                                          everywinter
                                          最後由 編輯

                                          Hi! Im a new user to ruby and i have just downloaded the file from your post but i cant seem to activate anything. I have the 'ruby console' under sketchup 'windows' but nothing's in there... Can you teach me what should i do? How should i start?

                                          1 條回覆 最後回覆 回覆 引用 0
                                          • J 離線
                                            Jim
                                            最後由 編輯

                                            Hi Geraldine,

                                            The Ruby Console you mention in the Windows menu is SketchUp's built-in Ruby Console.

                                            This plugin creates a Ruby Toolbar in the View >> Toolbars menu. The toolbar provides some shortcuts for using the Ruby Console and only runs on Windows machines.

                                            506.png

                                            So to install it, you download the .zip file, and extract it. Then copy the files to your Plugins folder as follows:

                                            504.png

                                            Then start Sketchup, and open the Toolbar from the Views >> Toolbars menu.

                                            To find your Plugins folder, copy and paste this line to the Ruby Console, then press ENTER.

                                            Sketchup.find_support_file("plugins")

                                            Hi

                                            1 條回覆 最後回覆 回覆 引用 0
                                            • 1
                                            • 2
                                            • 3
                                            • 2 / 3
                                            • 第一個貼文
                                              最後的貼文
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement