CadProgressMeter
from OpenCAD2D import CadProgressMeter
class CadProgressMeter(System.Object) ยท CadProgressMeter in the .NET reference
One meter of the status bar, started by CadProgress.Start, as AutoCAD's ProgressMeter: given a limit (CadProgressMeter.SetLimit) and moved a step at a time (CadProgressMeter.MeterProgress), or told a share of 0 to 1 as an IProgress (CadProgressMeter.Report), as CadDocument.SaveAs tells it; indeterminate, a sweep with no percent, until either. Stopping it, or disposing of it, takes it off the status bar; a meter stopped is not moved again.
Properties and fields
IsIndeterminate
@property
def IsIndeterminate(self) -> bool
Gets whether it is indeterminate: given neither a limit nor a share yet.
IsRunning
@property
def IsRunning(self) -> bool
Gets whether it runs: started and not yet stopped.
Label
@property
def Label(self) -> str
Gets what the status bar says of it, as "Saving plan.dwg".
Limit
@property
def Limit(self) -> int
Gets the number of steps it was given by CadProgressMeter.SetLimit; 0 for none.
Percent
@property
def Percent(self) -> int
Gets the whole percent it shows, 0 to 100; -1 while it is indeterminate.
Position
@property
def Position(self) -> int
Gets the steps made since the limit was set.
Methods
Dispose
def Dispose(self) -> None
Stops it, as CadProgressMeter.Stop.
MeterProgress
def MeterProgress(self) -> None
Moves it one step of its limit, as AutoCAD's MeterProgress; a step past the limit leaves it at 100 %, and one with no limit set does nothing.
Report
def Report(self, value: float) -> None
Shows a share of the work done, 0 to 1, as a whole percent rounded down: 0.405 shows 40 %. A share below 0 is 0, one above 1 is 1, and one that is not a number is not shown.
SetLimit
def SetLimit(self, limit: int) -> None
Sets the number of steps the work takes, the meter going back to 0 %, as AutoCAD's SetLimit; 0 makes it indeterminate again.
Stop
def Stop(self) -> None
Stops it, taking it off the status bar and showing the meter under it, if any; stopping it again does nothing.
Operators and Python protocols
__enter__
def __enter__(self) -> Self
__exit__
def __exit__(self, *args: object) -> None