Tekla Open API

Detailed and full API reference helps you master Tekla Open API

This is the most recent version of Tekla Open API.
For older versions, please visit Tekla Warehouse.

OperationProgressBar Class

The ProgressBar class implements progress bar with cancel button.
Inheritance Hierarchy

Namespace:  Tekla.Structures.Model.Operations
Assembly:  Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2018.1.0.0 (2018.1.0.0)
public class ProgressBar

The OperationProgressBar type exposes the following members.

  Name Description
Public method OperationProgressBar
Initializes a new instance of the OperationProgressBar class
  Name Description
Public method Canceled
Check if cancel has been pressed.
Public method Close
Close progress bar. Can be called even if Display was not successful.
Public method Display
Display progress bar dialog with cancel button. Display will fail if progress bar is already displayed.
Public method SetProgress
Update status information on the progress bar.
The following example displays progress bar, updates progress, checks if cancel has been pressed and closes the progress bar.
var progress = new Tekla.Structures.Model.Operations.Operation.ProgressBar();
bool displayResult = progress.Display(100, "title", "message", "cancel..", " ");
// looping ii from 0 to totalCount-1
    if (ii % 20 == 0) // progress update every 20th item
        if (progress.Canceled())
        progress.SetProgress(ii.ToString(), 100*ii/totalCount);
See Also