Accessing Task Group APIs

As of ANSYS 18.0, Workbench task groups 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:

taskGroup = ExtAPI.DataModel.TaskGroups[0]

The task group 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.


Note:  When a task group is accessed from an ACT script, an instance of UserTaskGroup is still used. A UserTaskGroupTemplate is now accessible from the property Template. All other task group functionality remains intact.


ClassMemberDescription

ITaskGroup

Name

The internal task group name.

Caption

The user-visible task group display text.

Tasks

The tasks contained in the task group.

InternalObject

The task group’s internal object.

TaskGroup

TaskId

The internal Workbench system identifier.

Caption

The Workbench UI-visible display text (system caption).

Abbreviation

The Workbench system abbreviation.

InternalObject

The Workbench system.

AnalysisType

The Workbench system analysis type.

DirectoryName

The Workbench system directory name.

Physics

The list of Workbench system physics.

Solver

The list of Workbench system solvers.

Notes

The Workbench system notes.

HeaderText

The Workbench system block title.

IsParametric

Indicates whether the Workbench system operates solely on parameters (appears below the Parameter Set bar in the Workbench Project Schematic).

Tasks

The list of tasks contained in this task group.

Template

Gets the template from which the task group was created.

GetTaskByName(name)

Gets the contained task by the supplied name.

Clean()

Clears generated data on all tasks in the task group.

Copy()

Creates a new task group containing a copy of all the data in the task group.

Delete()

Deletes the task group and all contained data from the project.

Refresh()

Refreshes the input data for all tasks in the task group by reading changed data from upstream sources. No calculations or updates based on the new data are performed.

Update()

Updates all tasks in the task group by refreshing the input from all upstream sources and then performing local calculation based on the current data.

RecreateDeletedTasks()

Recreates new versions of any tasks that have been deleted from the task group.


Release 18.2 - © ANSYS, Inc. All rights reserved.