Skip to content

OptimizationProgressChangedEventArgs.Progress

property · OptimizationProgressChangedEventArgs · cAlgo.API Since 5.9

DesktopCLICloud

Gets the progress percentage of the current operation.

Environment behaviour

CLI — not supported. Available to plugins only, and plugins cannot run in the CLI.

Cloud — not supported. Available to plugins only, and plugins cannot run in the cloud.

Definition

public double Progress {get;}
optimizationProgressChangedEventArgs.Progress: float

Returns double

Examples

protected override void OnStart()
{
    Optimization.ProgressChanged += OnProgressChanged;
}

private void OnProgressChanged(OptimizationProgressChangedEventArgs args)
{
    Print("Optimization progress: {0:F1}%", args.Progress);
}
def on_start(self):
    api.Optimization.ProgressChanged += self.on_progress_changed

def on_progress_changed(self, args):
    api.Print(f"Optimization progress: {args.Progress:.1f}%")