CoCreate User Forum  

Go Back   CoCreate User Forum > Support > Customization

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 04-08-2009, 06:45 AM
Yoyovento Yoyovento is offline
Registered User
 
Join Date: Apr 2009
Posts: 31
Cool progression bar

Evening,

Do you know if it's possible to add a script into another one to show a progression bar ?
Reply With Quote
  #2  
Old 04-08-2009, 11:43 AM
John Scheffel's Avatar
John Scheffel John Scheffel is offline
Administrator
 
Join Date: Sep 2002
Location: San Jose, CA
Posts: 1,288
Re: progression bar

It might help to provide some more information. Are you talking about LISP code for Modeling or Macro code for Drafting? For what type of process do you want to display a progress bar? Do you have any sample code that you can post or attach?
__________________
John Scheffel
Reply With Quote
  #3  
Old 04-08-2009, 10:34 PM
Yoyovento Yoyovento is offline
Registered User
 
Join Date: Apr 2009
Posts: 31
Re: progression bar

Ok I'll try to give you more informations sorry to haven't give enough details.
I wrote a lisp code (thanks for help) :
http://cocreateusers.org/forum/showthread.php?t=7190

And this could take several minutes. So, instead of waiting in front of the screen, I would like to know if I could take a coffee ;-)
I guess a progression bar could be useful :



Perhaps a simple message could be showned instead of the bar and it's says : "Operations will take x minutes..." because I know approx. times according to operations.

Hope this help.

thanks again
Reply With Quote
  #4  
Old 04-09-2009, 11:35 AM
Wolfgang's Avatar
Wolfgang Wolfgang is offline
Registered User
 
Join Date: Nov 2002
Location: ... near Sindelfingen near Stuttgart, Germany
Posts: 754
Re: progression bar

The easiest way is to use the console window.

at beginning or your long lasting operation:
Code:
(sd-show-console-window)
Inside your loop:
Code:
(format T "~%~4D % of operation done, estimated time to finish : ~A sec."
         (round (* (/ x all-x) 100)) est-time-left)
You can create a 'pseudo' bar by printing a "=" for each 2%
Attached Thumbnails
Click image for larger version

Name:	progress_bar.png
Views:	412
Size:	21.1 KB
ID:	1457  

Last edited by Wolfgang; 04-14-2009 at 09:56 AM. Reason: screen shot added + typo fixed (see Claus's posting)
Reply With Quote
  #5  
Old 04-14-2009, 03:37 AM
Yoyovento Yoyovento is offline
Registered User
 
Join Date: Apr 2009
Posts: 31
Re: progression bar

thanks for this tip. Unfortunately I can't use this (due to my lacks about lips), this error appears :



where C is the counter of my loop and NB the total of loop
Reply With Quote
  #6  
Old 04-14-2009, 07:34 AM
clausb's Avatar
clausb clausb is offline
Registered User
 
Join Date: Nov 2002
Posts: 1,168
Re: progression bar

There was a typo in Wolfgang's code example:

Code:
      (round ((/ x all-x) * 100))
should have read

Code:
   (round (* 100 (/ x all-x)))
__________________
CoCreate Modeling FAQ: http://www.clausbrod.de/CoCreateModeling/
Reply With Quote
  #7  
Old 04-14-2009, 11:09 PM
Yoyovento Yoyovento is offline
Registered User
 
Join Date: Apr 2009
Posts: 31
Re: progression bar

that's true, just a question "est-time-left" is a variable to define or this is a function used into lisp basics ?
Reply With Quote
  #8  
Old 04-14-2009, 11:18 PM
clausb's Avatar
clausb clausb is offline
Registered User
 
Join Date: Nov 2002
Posts: 1,168
Re: progression bar

It's a variable.
__________________
CoCreate Modeling FAQ: http://www.clausbrod.de/CoCreateModeling/
Reply With Quote
  #9  
Old 04-15-2009, 02:06 AM
Yoyovento Yoyovento is offline
Registered User
 
Join Date: Apr 2009
Posts: 31
Re: progression bar

thnaks, any idea to calculate time between 2 operations ?
Reply With Quote
  #10  
Old 04-15-2009, 02:50 AM
clausb's Avatar
clausb clausb is offline
Registered User
 
Join Date: Nov 2002
Posts: 1,168
Re: progression bar

See http://l1sp.org/cl/get-universal-time. Code samples: http://www.clausbrod.de/OneSpaceModeling/MacroListDirectory , http://www.clausbrod.de/OneSpaceModeling/MacroAlarmClock .
__________________
CoCreate Modeling FAQ: http://www.clausbrod.de/CoCreateModeling/
Reply With Quote
  #11  
Old 04-16-2009, 01:41 AM
Yoyovento Yoyovento is offline
Registered User
 
Join Date: Apr 2009
Posts: 31
Re: progression bar

wonderful, just to bore you, do you know how to stay at the same line in the console-window ? I know ~% allows to go back to the next line but I don't know the opposite even if I look for on the net.
Reply With Quote
  #12  
Old 04-16-2009, 02:28 AM
clausb's Avatar
clausb clausb is offline
Registered User
 
Join Date: Nov 2002
Posts: 1,168
Re: progression bar

Code:
(format t "Watch this:~%")
(dotimes (i 5)
  (sleep 1)
  (format t "~A~A" i #\Return))
Claus
__________________
CoCreate Modeling FAQ: http://www.clausbrod.de/CoCreateModeling/
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 01:05 AM.



Hosted by SureServer    Forums   Modeling FAQ   Macro Site   Vendor/Contractors   Software Resellers   CoCreate   Gallery   Home   Board Members   Regional User Groups  By-Laws  

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.