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 to create a progress bar

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

      One reason to not add methods to existing SketchUp space is because in the future, SketchUp itself might decide to add that same method. Then you'll be conflicting.

      Lately you've been tan, suspicious for the winter.
      All my Plugins I've written

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

        @squall290586 said:

        I change the module sketchup with a new method it's not an existant method.
        It's very important?

        I recommend you read this: http://www.thomthom.net/thoughts/2012/01/golden-rules-of-sketchup-plugin-development/

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

        1 條回覆 最後回覆 回覆 引用 0
        • S 離線
          Squall290586
          最後由 編輯

          @thomthom said:

          @squall290586 said:

          I change the module sketchup with a new method it's not an existant method.
          It's very important?

          I recommend you read this: http://www.thomthom.net/thoughts/2012/01/golden-rules-of-sketchup-plugin-development/

          Thanks for this link, I will to read that carefully 😄.

          1 條回覆 最後回覆 回覆 引用 0
          • S 離線
            Squall290586
            最後由 編輯

            Hi,

            A new version of my progress bar is available (Version 1.1).
            After severals tests, I modify the generation of the web page using jQuery JS framework.

            And now, a processing management is available to execute the processes one by one.

            1 條回覆 最後回覆 回覆 引用 0
            • L 離線
              LFloissac
              最後由 編輯

              Hi Gregory,

              "Félicitations" (I'm French too) for your plugin.

              I'm using SU Pro - 8.0.14346 and your plugin ProgressBar v1.29
              I've tried to use your plugin and obtain the following message: "Run aborted. Error: progress_bar.rb:48:in `set_file': can't convert nil into String"
              the code used to call the plugin is from your example (see above). Do you have a suggestion ?

              require 'progress_bar.rb'

              pb = Squall::ProgressBar.new(200);
              pb.onCancel() {puts "cancel"};
              pb.process() {
              i = 0;
              loop{
              pb.progress();
              i += 1;
              break if(i == 200);
              sleep(0.5)
              };
              };

              1 條回覆 最後回覆 回覆 引用 0
              • G 離線
                glro
                最後由 編輯

                @lfloissac said:

                Hi Gregory,

                "Félicitations" (I'm French too) for your plugin.

                I'm using SU Pro - 8.0.14346 and your plugin ProgressBar v1.29
                I've tried to use your plugin and obtain the following message: "Run aborted. Error: progress_bar.rb:48:in `set_file': can't convert nil into String"
                the code used to call the plugin is from your example (see above). Do you have a suggestion ?

                require 'progress_bar.rb'

                pb = Squall::ProgressBar.new(200);
                pb.onCancel() {puts "cancel"};
                pb.process() {
                i = 0;
                loop{
                pb.progress();
                i += 1;
                break if(i == 200);
                sleep(0.5)
                };
                };

                line 48 of progress_bar.rb is
                "@dialog.set_file(Sketchup.find_support_file("progressBar.html", "/Plugins/ProgressBar/html"))"

                maybe it is related to the "progressBar.html" file

                I downloaded version 1.29 too, and the code works perfectly on my computer: a progress bar does appear on my screen

                1 條回覆 最後回覆 回覆 引用 0
                • G 離線
                  glro
                  最後由 編輯

                  [quote="Squall290586"]

                  And for finish, this is a little example:

                  
                  	pb = Squall;;ProgressBar.new(200); 
                  	pb.onCancel() {puts "cancel"}; 
                  	pb.process() {
                  		i = 0;
                  		loop{
                  			pb.progress();
                  			i += 1;
                  	 		break if(i == 200);
                  	 		sleep(0.5)
                  		};
                  	};
                  
                  

                  i just downloaded v 1.29, installed it, and typed the code above in a ruby editor; it works fine

                  I am not sure about how to use this plugin in a plugin of mine, though...

                  I guess that i have to type this code in mine, and adjust the increase of "i" parameter according to my process; it is correct?

                  or could you give a few words of explanation?

                  thank you

                  1 條回覆 最後回覆 回覆 引用 0
                  • L 離線
                    LFloissac
                    最後由 編輯

                    Thanks, it was a path "/Plugins/ProgressBar/html" problem.
                    It works now !

                    1 條回覆 最後回覆 回覆 引用 0
                    • H 離線
                      Hooch
                      最後由 編輯

                      Hey, i actually writing a plugin for SketchUp and implemented the progressbar. On windows this works fine and as expected, but now i tried to port this plugin for mac and the progressbar causes bugsplats. In my opinion the using of a second thread causes (the single threaded?) SketchUp to crash. Did anyone mentioned this before or has someone a workaround for this problem?

                      1 條回覆 最後回覆 回覆 引用 0
                      • tt_suT 離線
                        tt_su
                        最後由 編輯

                        Are you using Ruby threads? Threads in Ruby 1.8 are green threads, meaning not native threads.

                        Can you elaborate on how you implemented a progressbar?

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

                        Advertisement