Using progressReport to update displayed text in progress bar

Howdy!
I am trying to use “progressReport” to update the command displayed in the progress bar when using “executeAsModel”. It looks like it doesn’t properly update on each invocation, i.e. the progress moves but the displayed text stays the same. For context I tried “await” in front of progressReport as well, since I wasn’t sure if it’s an async function, but that doesn’t seem to fix it either. Before calling this a bug I wanted to make sure this wasn’t a pilot error :slight_smile: Here’s an example of my usage:

async function doMultipleThings(executionContext){

        // Do something:
	executionContext.reportProgress({
		"value": 0.1, 
		"commandName": "Do something"
	});
	await doSomethingHeavy();

	// Do something else:
	executionContext.reportProgress({
		"value": 0.4, 
		"commandName": "Do some more stuff"
	});
        await doSomeMoreStuff();
}
1 Like

According to docs this should work, so might be a bug

Same problem in my code

Since reporting this I have also tried the progress bar UI (e.g. as part of the panel) and did encounter a similar problem, though was able to somewhat make it work by adding a small delay after updating the progress bar, i.e. waiting a few milliseconds to give the GUI time to update.

1 Like