OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: domenicomaria on June 16, 2023, 03:40:48 AM

Title: ProgressBar example
Post by: domenicomaria on June 16, 2023, 03:40:48 AM
Is there anyone who uses the ProgressBar control and can show me an example of how to use it ?
Title: Re: ProgressBar example
Post by: JustCurious on June 27, 2023, 04:56:27 AM
It is too bad this forum seems near dead, too bad for everyone. In my case I abondoned OpenDCL and took a few steps back, just vanilla CAD now for me.
Title: Re: ProgressBar example
Post by: TCNTRM on June 29, 2023, 03:07:05 AM
Quote from: domenicomaria on June 16, 2023, 03:40:48 AM
Is there anyone who uses the ProgressBar control and can show me an example of how to use it ?

You have an example in Misc odcl sample.

But I'll try to explain a little. I'm using it in a while loop. First you set min (0) and max (length of selection for example) value of progress bar. And then through loop it sets each new value as it goes and redraws it. Here is some simple code:
(DCL-CONTROL-SETMINVALUE TEST/Palette1/ProgressBar1 0)
(DCL-CONTROL-SETMAXVALUE TEST/Palette1/ProgressBar1 length)
(while (< n length)
  (DCL-CONTROL-SETVALUE TEST/Palette1/ProgressBar1 n)
  (DCL-CONTROL-REDRAW TEST/Palette1/ProgressBar1)
  ...
  (setq n (+ n 1))
  );while
Title: Re: ProgressBar example
Post by: domenicomaria on July 01, 2023, 08:52:13 AM
Thank you.

I'll take a look at it

ciao