sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Plugin to create a progress bar

    Scheduled Pinned Locked Moved Plugins
    23 Posts 12 Posters 4.4k Views 12 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
      Squall290586
      last edited by

      I change the plugin, i create a new module with a new method.
      The link is be updated (version 1.02)

      1 Reply Last reply Reply Quote 0
      • A Offline
        Aerilius
        last edited by

        Hi,
        we usually use an author module and then a module name of our choice ( Utils is a very generic word). Like

        module Squall
          module Utils
          end
        end
        
        1 Reply Last reply Reply Quote 0
        • S Offline
          Squall290586
          last edited by

          @aerilius said:

          Hi,
          we usually use an author module and then a module name of our choice ( Utils is a very generic word). Like

          module Squall
          >   module Utils
          >   end
          > end
          

          Indeed, i change all my class and i prefixe all that by the module Squall.

          1 Reply Last reply Reply Quote 0
          • Chris FullmerC Offline
            Chris Fullmer
            last edited by

            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 Reply Last reply Reply Quote 0
            • thomthomT Offline
              thomthom
              last edited by

              @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 Reply Last reply Reply Quote 0
              • S Offline
                Squall290586
                last edited by

                @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 Reply Last reply Reply Quote 0
                • S Offline
                  Squall290586
                  last edited by

                  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 Reply Last reply Reply Quote 0
                  • L Offline
                    LFloissac
                    last edited by

                    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 Reply Last reply Reply Quote 0
                    • G Offline
                      glro
                      last edited by

                      @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 Reply Last reply Reply Quote 0
                      • G Offline
                        glro
                        last edited by

                        [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 Reply Last reply Reply Quote 0
                        • L Offline
                          LFloissac
                          last edited by

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

                          1 Reply Last reply Reply Quote 0
                          • H Offline
                            Hooch
                            last edited by

                            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 Reply Last reply Reply Quote 0
                            • tt_suT Offline
                              tt_su
                              last edited by

                              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 Reply Last reply Reply Quote 0
                              • 1
                              • 2
                              • 1 / 2
                              • First post
                                Last post
                              Buy SketchPlus
                              Buy SUbD
                              Buy WrapR
                              Buy eBook
                              Buy Modelur
                              Buy Vertex Tools
                              Buy SketchCuisine
                              Buy FormFonts

                              Advertisement