ACT provides progress monitoring for custom workflows via the property
ExtAPI.UserInterface.ProgressMonitor. This property returns
an object of type IProgressMonitor.
The following APIs are available:
| Class | Member | Description |
|---|---|---|
|
|
|
The name of the current work under progress monitoring. |
|
|
The current status for the work under progress monitoring. | |
|
|
The current details for the work under progress monitoring. | |
|
|
The total number of work units allocated to the work under progress monitoring. | |
|
|
The completed number of work units. | |
|
|
The parent progress monitor, if this is a child monitor. Otherwise, null. | |
|
|
Indicates whether to propagate a child’s work status up to the parent. | |
|
|
Indicates whether to propagate a child’s work details up to the parent. | |
|
|
Indicates whether the user can cancel the current operation. | |
|
|
Indicates whether the user can interrupt the current operation. | |
|
|
Starts work engaged with progress monitoring. | |
|
|
Updates the current work units. | |
|
|
Marks the current work as complete (progress at 100%). | |
|
|
Creates a child progress monitor with the current monitor as its parent. | |
|
|
The current status of this progress monitor.
|
A sample implementation of progress monitoring functionality follows.
def update(task):
monitor = ExtAPI.UserInterface.ProgressMonitor
monitor.BeginWork("Testing 123...", 3)
LogProgress(monitor)
monitor.WorkStatus = "Test Status!"
monitor.WorkDetails = "Test Details!"
System.Threading.Thread.Sleep(2000)
monitor.UpdateWork(1)
LogProgress(monitor)
monitor.WorkDetails = "More details..."
System.Threading.Thread.Sleep(2000)
monitor.UpdateWork(1)
LogProgress(monitor)
monitor.WorkDetails = "Even more details..."
System.Threading.Thread.Sleep(2000)
monitor.UpdateWork(1)
LogProgress(monitor)
monitor.WorkDetails = "Final details..."
System.Threading.Thread.Sleep(2000)
monitor.EndWork()
def LogProgress(monitor):
ExtAPI.Log.WriteMessage("Progress: " + str(monitor.CompletedWorkUnits)
+ "/" + str(monitor.TotalWorkUnits))