As of ANSYS 18.0, Workbench tasks are exposed at the user level through Automation API wrappers in the namespace
Ansys.ACT.WorkBench.Automation.Workflows. The Project
Data Model returns this wrapper type:
task = ExtAPI.DataModel.Tasks[0]
The task wrapper does not store any local data. All data access and modification occur at member call time.
The following table lists the APIs that are available. For the class
Task, property access is provided through a dictionary.
You access a property wrapper by name to get or set values. For example, the
Geometry component exposes the property ImportSolidBodies.
You can access and change this property as follows:
task = ExtAPI.DataModel.Tasks[0] task.Properties[“GeometryImportSolidBodies”].Value = True
Note: ACT-defined callbacks still receive UserTasks as
arguments. A UserTaskTemplate is now accessible from the
property Template. All other task functionality remains
intact.
| Class | Member | Description |
|---|---|---|
|
|
|
The internal task name. |
|
|
The user-visible task display text. | |
|
|
The parent task group. | |
|
|
The task's internal object. | |
|
|
|
The internal Workbench component identifier. |
|
|
The Workbench UI-visible display text. | |
|
|
The task group wrapper for the component's system instance. | |
|
|
The Workbench component. | |
|
|
The list of tasks providing data to this task. | |
|
|
The list of tasks consuming data from this task. | |
State |
The task state. | |
Template |
Gets the template from which the task was created. | |
|
|
Gets the ID to display in the UI. | |
|
|
Gets the data directory name to display in the UI. | |
|
|
Gets the master task from which the task directly consumes
shared data. This is always the immediate upstream sharing
source, even if the sharing is full-share. For the true root
data task, use | |
|
|
Gets the shared data root task from which the task consumes shared data. This is always the first (original, non-grayed) sharing source if fully shared. Otherwise, it is the task itself. | |
|
|
Gets a value indicating whether the task is a slave of a master-sharing source. | |
|
|
Gets the container for the task. | |
|
|
Gets the task notes. | |
|
|
Gets the used license for the component. This dictionary maps the license IDs to the number of used licenses for the task. | |
|
|
Gets the task solver type. | |
|
|
Gets the name for the task icon image. | |
|
|
Gets a value indicating whether the task is in a failed state from a previous data operation, such as update or refresh. | |
|
|
Gets a value indicating whether the task should always be part of a design point update, even if it does not affect any parameter value. | |
|
|
Gets the list of coupled client data tasks. | |
|
|
Gets the coupling server task (if available). | |
|
|
Gets the task coordinate ID as a union of the task group letter and task index. | |
|
|
The list of input and output parameters associated with the task. | |
|
|
Gets a dictionary of properties, accessible by property name. | |
|
|
Gets the input data, by type string key, for the task. | |
|
|
Gets the output data, by type string key, for the task. | |
|
|
Gets the names of all properties declared with the task's data model. | |
|
|
Executes a specific task-bound command. | |
|
|
Deletes the heavyweight data of this task to reduce the size of the project. Heavyweight data can include the solution, results, or both. | |
|
|
Refreshes the input data for a task by reading all changed data from upstream (source) tasks. No calculations or updates based on this new data are performed. | |
|
|
Resets the task by removing all user input and result data. | |
|
|
Updates the task by refreshing the input from all upstream components and then performs a local calculation based on current data. | |
|
|
Deletes the task and all dependents from its task group. |