sketchucation logo sketchucation
    • Login
    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!
    Mac User? | Join the Rayscaper Beta for Mac Learn More

    Plugin to create a progress bar

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

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

                          1 Reply Last reply
                          Reply Quote 0
                          • H
                            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
                              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

                              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                              With your input, this post could be even better 💗

                              Register Login
                              • 1
                              • 2
                              • 2 / 2
                              • First post
                                Last post
                              Buy SketchPlus
                              Buy SUbD
                              Buy WrapR
                              Buy eBook
                              Buy Modelur
                              Buy Vertex Tools
                              Buy SketchCuisine
                              Buy FormFonts

                              Advertisement