Table of Contents
This module provides you with ability to control the MineSight® 3D progress meter. This is useful for giving the user an indication that a long process may active within your script.
The progress meter module defines a ProgressMeter object that controls access to the MineSight® 3D progress meter. The progress meter generally follows these three steps.
- Start the progress meter with your number of updates.
- Update the progress meter to a new percentage completed.
- Stop the progress meter to notify MineSight® 3D to clean up the and stop displaying the progress meter.
As an example, consider incrementing the progress meter as you calculate the area of all polygons selected by the user (see the %MEDEXE%/scripts/samples/grail.ms3d.elementop/em-calculate-area.py script for details).
In this case we use the increment method, and supply the progressmeter with the next index (i.e. the next iteration). We could have just as easily computed the percentage completed, and supplied that value via the percent method.
If another process is holding onto the progress meter, the start() call will return 0.
Defines an object that provides access to the MineSight® 3D progress meter.
Increments the progress meter to the new step value.
For example if your progress meter was specified with 10 iterations, and you set the step to 1, the progress meter in MineSight® 3D would display 10%.
This method is useful when you are iterating through a set of objects.
Takes a fractionalPercent ranging from 0 to 1.0 and displays it as an integer percent ranging from 0% to 100% on the MineSight® 3D progress meter.
In this case you have to compute the percentage value that you want displayed in the MineSight® 3D progress meter bar.
Update the progress meter with the new integer percent value. You need to compute the new percentage value, and it must be between 0 and 100%.
Warning
DEPRECATED (as of MineSight® Grail v3.50-05)
Prefer to use either the percent or increment function calls instead. There was a lot of misunderstanding on how to use this method in the past. This function call is equivalent to calling the percent method and dividing your value by 100.0.