License delivery maintenance is planned for Saturday, July 26, between 12:00 and 20:00 CEST. During this time, you may experience outages or limited availability across our services, including BIMcloud SaaS, License Delivery, Graphisoft ID (for customer and company management), Graphisoft Store, and BIMx Web Viewer. More details…

Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

How to make progress bar move?

Anonymous
Not applicable
Hi.

I am trying to use DG::ProgressBar but I don't know how to make the bar move. It just stays still. Should I rewrite some functions?
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Anonymous
Not applicable
I have solved it. To make it move, you should use class "modeless" but not class "modal". Class "modal" will block the program to wait for action like a click or something else.

View solution in original post

7 REPLIES 7
I haven't used that specific control, but I assume ProgressBar::SetValue would do it.
Ralph Wessel BArch
Central Innovation
Anonymous
Not applicable
Ralph wrote:
I haven't used that specific control, but I assume ProgressBar::SetValue would do it.
Thank you. But I was wondering if the dialog can keep showing while the program call SetValue? I can only make the dialog show itself by calling "dialog.Invoke()". But the dialog shown by Invoke() seems to be a still one and the progress bar of it doesn't move.
scandi wrote:
I was wondering if the dialog can keep showing while the program call SetValue? I can only make the dialog show itself by calling "dialog.Invoke()". But the dialog shown by Invoke() seems to be a still one and the progress bar of it doesn't move.
What is the context? Are you displaying something like a progress window while a process is running? If so, you probably want a palette rather than a modeless dialog. You might need to call a redraw method on a progress bar if the value is changed too.

Also, if this is a progress window, you might want to use Archicad's standard process feedback UI. Take a look at the documentation for APIIo_InitProcessWindowID - it provides a code sample. There's probably a C++ wrapper for that too if you hunt around - the documentation for this is mostly absent though.
Ralph Wessel BArch
Central Innovation
Anonymous
Not applicable
Ralph wrote:
scandi wrote:
I was wondering if the dialog can keep showing while the program call SetValue? I can only make the dialog show itself by calling "dialog.Invoke()". But the dialog shown by Invoke() seems to be a still one and the progress bar of it doesn't move.
What is the context? Are you displaying something like a progress window while a process is running? If so, you probably want a palette rather than a modeless dialog. You might need to call a redraw method on a progress bar if the value is changed too.

Also, if this is a progress window, you might want to use Archicad's standard process feedback UI. Take a look at the documentation for APIIo_InitProcessWindowID - it provides a code sample. There's probably a C++ wrapper for that too if you hunt around - the documentation for this is mostly absent though.
Thank you. I will try the palette. Is there any sample for that?
scandi wrote:
I will try the palette. Is there any sample for that?
Take a look at OwnerDrawnListBoxPalette in DG_Test or BrowserPalette in BrowserControl.
Ralph Wessel BArch
Central Innovation
Anonymous
Not applicable
Ralph wrote:
scandi wrote:
I will try the palette. Is there any sample for that?
Take a look at OwnerDrawnListBoxPalette in DG_Test or BrowserPalette in BrowserControl.
Thanks a lot!
Solution
Anonymous
Not applicable
I have solved it. To make it move, you should use class "modeless" but not class "modal". Class "modal" will block the program to wait for action like a click or something else.