Maptitude GISDK Help

UpdateProgressBar()

Summary

Updates a progress bar in the progress window.

 

Syntax

interrupted = UpdateProgressBar(string activity, integer percentage [, array substitution:values] )

 

Argument Contents
activity A formatted string displayed with the progress bar, that indicates what is progressing
percentage The completion percentage indicated in the progress bar
substitution_values Optional. A list of values to be replaced in the activity string

 

Returns

The string "True" if the user has pressed the cancel button since the most recent progress bar update; the string "False" if the cancel button has not been pressed.

 

Notes

Example

 

SetProgressWindow("Status", 1)
CreateProgressBar("Finding %s", "True", {"Neighbors"})
loops = 1000000
for i = 1 to loops do
   stat = UpdateProgressBar("Step Number %i", r2i(i/loops), {i})
   if stat = "True" then do
       ShowMessage("You Quit!")
       goto quit_loop

   end


   // Do some processing here

   //...

   //...


end
quit_loop:
DestroyProgressBar()
ResetProgressWindow()

 

 

Error Codes

Error Type Meaning
Error There was no preceding call toCreateProgressBar()

 

See Also

Function Summary
CreateProgressBar() Creates a new progress bar that reports the progress of an operation
DestroyProgressBar() Destroys a progress bar, indicating completion of an operation
ResetProgressWindow() Resets the title and the maximum number of progress bars that can be created in the progress window to the number prior to the last call to SetProgressWindow()
SetProgressWindow() Sets the title and the maximum number of progress bars that can be created in the progress window

 

 

©2025 Caliper Corporation www.caliper.com