Hi,
I apologize for my English .
I am french and my English is not very good.
Actually, i develop a plugin to make GCode for milling machine.
It's not ready for the moment but despite searches I did not find progress bar for sketchup.
Suddenly I develop this and i think that be util for another .
You can find this plugin on this link:
https://docs.google.com/folder/d/0B9Gb-sUls44ANW1JRkM5U2lveEU/edit
With this plugin a new class andis available.
This class is "Squall::ProgressBar", she have 4 instance methods:
-
initialize(max, title = "In progress", waitingMessages = [])
"max" is the maximum value of the progress bar
"title" is the title of the popup
"timeLeft" is the text display after the estimate seconds
"waitingMessages" is a array with an messages array, messages are displayed during the process
-
process() {statement}
This method display the progress bar and execute the statement
-
progress(i = 1)
This method update the advancement of the progress bar
-
onCancel() {statement}
This method launch the statement if the progress bar is closed
This class have a static variable.
This variable is initialized to true if a progress bar is active.
The name of this is "Squall::ProgressBar.processing"
If several progress bar are open in same time.
They will be executed one by one.
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)
};
};
If you have any problem with that, can you send me a message with the problem?
Thank in advance.
A little link on a video:
http://youtu.be/hQqEBsZyrs0