Accessing Task Template APIs

As of ANSYS 18.0, Workbench task templates 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]
template = task.Template

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

ClassMemberDescription

TaskTemplate

Name

Gets the task template name.

TaskTypeAbbreviation

Gets the default name for the task.

DisplayName

Gets the user-visible name of the task created from the template. If the task group template gives a name for the taskusing the property TaskNames, it takes precedence.

Solver

Gets the solver type in the task. If specified, this contributes to property Solver for the containing task group.

IsResults

Gets a value indicating whether the task represents result data, which is then not duplicated when the user invokes DuplicateSystemWithoutResults.

IsShareable

Gets a value indicating whether one instance of this type of task can be shared by another task.

IsReplaceable

Gets a value indicating whether sharing of this type of task can be changed dynamically from sharing to unsharing or vice versa.

IsReplaceableWithSharing

Gets a value indicating whether sharing of this type of task can be changed dynamically from an independent task to a full-sharing task. This covers one of the two aspects of what IsReplaceable defines.

IsDeletable

Gets a value indicating whether this type of task and its downstream tasks can be deleted from its task group.

IsPartialShareOnly

Gets a value indicating whether this type of task engages in only partial sharing.

DontShareByDefault

Gets a value indicating whether this type of task has all connections established as "provides" connections to new systems (instead of sharing).

RequiredInputTypes

Gets a list of types that are required as inputs for the task to be valid.

OutputTypes

Gets a list of types that are contained in the task after creation.

EquivalentInptus

Gets a list of equivalent entity types as inputs for the task.

CreatingCommandName

Gets the name of a command that creates the container to be inserted in the task group.

DeletingCommandName

Gets the name of a command that is invoked before deleting the container.

UpdateCommandName

Gets the name of a command that updates the container's contents based on the upstream containers on which it depends.

DataGroupUpdateCommandName

Gets the name of a command that updates the data groups of the task's container.

WillBePendingUponUpdateQueryName

Gets the name of a query that returns whether the task goes into the pending state upon update.

WillBeUpdatedViaRsmQueryName

Gets the name of a query that returns whether the task is updated via ANSYS Remote Solve Manager (RSM) or the EKM (Engineering Knowledge Manager) Portal.

RemoteSolvePermissionsQueryName

Gets the name of a query that returns whether the task can be part of a design point update via RSM or the Portal.

EditorInitiatedRemoteUdpateInfoQueryName

Gets the name of a query that returns all remote update information for this task that was initiated from within the add-in editor.

RefreshCommandName

Gets the name of a command that refreshes the task's inputs from upstream containers.

DataSourceListChangedCommandName

Gets the name of a command that handles input source changes for the task.

TaskStatusQueryName

Gets the name of a query that returns the status of the task.

DataGroupStatusQueryName

Gets the name of a query that returns the status of the data groups of the task's container.

DuplicateTaskCommandName

Gets the name of a command that duplicates the entire task content.

DuplicateUserDataCommandName

Gets the name of a command that duplicates only the user input data.

AvailableTransferTasks

Gets the list of available transfer tasks that can be exposed from the task.

ReportContentCreationCommandName

Gets the name of a command that provides general report content for the task.

DesignPointReportContentCreationCommandName

Gets the name of a command that provides design point report content for the task.

CleanCommandName

Gets the name of a command that cleans the container’s heavyweight output data and deletes associated data files.

ResetCommandName

Gets the name of a command that resets the container’s internal data.

AboutToResetCommandName

Gets the name of a command that prepares to reset the container’s internal data. The task can stop resetting by throwing an exception.

ComponentPropertyDataQueryName

Gets the name of a query that returns custom data to show in the task group properties view.

CanUseTransferDataQueryName

Gets the name of a query that returns whether a user-connection can be established between a transfer task and a data task.

CanDuplicateQueryName

Gets the name of a query that returns whether a task created from the template can be duplicated.

DuplicateGroup

Gets the group within which tasks can potentially be replaced or duplicated.

ComponentImageName

Gets the name of the default image to use as the task icon.

ValidationCodes

Gets the task’s validation codes.

DefaultTransferName

Gets the name given to the default outputs of the task if they are offered as part of a transfer selection popup.

IncludeInPartialUpdate

Gets a value indicating whether to consider the task for a partial update.

RefreshAfterPartialUpdate

Gets a value indicating whether to refresh the downstream task after a partial update.

ShowOptionToAlwaysBePartOfDpUpdate

Gets a value indicating whether the user should be given the option to always update the task as part of a design point update.

GetEnvironmentForRsmDpUpdateQueryName

Gets the name of a query that returns environment variables set as part of a design point update via RSM.

GetRemoteUpdateMonitorFilesQueryName

Gets the name of a query that returns monitor files during a RSM design point update.

SubTasks

Gets the list of subtasks.

SubTaskStatusQueryName

Gets the name of a query that returns subtask states.

IsDisabled

Gets a value indicating whether the template is a fake template for an orphaned task, where the normal template is not accessible. The task should be shown as disabled and no operations should be available.

IsAim

Gets a value indicating whether the template is an AIM task template.

InternalObject

Gets the internal component template represented by the task template.


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