BaseDatapin#

class BaseDatapin(element_id: ansys.api.modelcenter.v0.element_messages_pb2.ElementId, engine: ansys.modelcenter.workflow.grpc_modelcenter.engine.Engine)#

Bases: ansys.modelcenter.workflow.grpc_modelcenter.abstract_workflow_element.AbstractWorkflowElement, ansys.modelcenter.workflow.api.IDatapin, abc.ABC

Represents a datapin on the workflow.

Overview#

get_state

Get the state of the datapin.

get_dependents

Get the dependent (output) datapins for the datapin.

get_precedents

Get the precedent (input) datapins for the datapin.

value_type

Get the type of value that the datapin stores.

is_input_to_component

Flag indicating if the datapin is an input in the context of the component it is on.

is_input_to_workflow

Flag indicating if the datapin is an input in the context of the overall workflow.

Import detail#

from ansys.modelcenter.workflow.grpc_modelcenter.base_datapin import BaseDatapin

Property detail#

property BaseDatapin.value_type: ansys.tools.variableinterop.VariableType#

Get the type of value that the datapin stores.

property BaseDatapin.is_input_to_component: bool#

Flag indicating if the datapin is an input in the context of the component it is on.

property BaseDatapin.is_input_to_workflow: bool#

Flag indicating if the datapin is an input in the context of the overall workflow.

Variables that are inputs in the context of their components are not included in the overall workflow if they are the target of a link.

Method detail#

BaseDatapin.get_state(hid: str | None = None) ansys.tools.variableinterop.VariableState#

Get the state of the datapin.

BaseDatapin.get_dependents(only_fetch_direct_dependents: bool, follow_suspended_links: bool) Collection[ansys.modelcenter.workflow.api.IDatapin]#

Get the dependent (output) datapins for the datapin.

Parameters:
only_fetch_direct_dependentsbool, optional

Whether to return only the direct dependents. The default is False, in which case all dependents are returned recursively.

follow_suspended_linksbool, optional

Whether to follow suspended links between datapins. The default is False.

Returns:
Collection[aew_api.IDatapin]

Collection of dependent datapins.

BaseDatapin.get_precedents(only_fetch_direct_precedents: bool, follow_suspended_links: bool) Collection[ansys.modelcenter.workflow.api.IDatapin]#

Get the precedent (input) datapins for the datapin.

Parameters:
only_fetch_direct_dependentsbool, optional

Whether to return only the direct dependents. The default is False, in which case all dependents are returned recursively.

follow_suspended_linksbool, optional

Whether to follow suspended links between datapins. The default is False.

Returns:
Collection[aew_api.IDatapin]

Collection of precedent datapins.