ReferenceArrayDatapinElement#
- class ReferenceArrayDatapinElement(parent_client: ansys.api.modelcenter.v0.grpc_modelcenter_workflow_pb2_grpc.ModelCenterWorkflowServiceStub, parent_element_id: ansys.api.modelcenter.v0.element_messages_pb2.ElementId, index: int, parent_engine: ansys.modelcenter.workflow.grpc_modelcenter.engine.Engine)#
Bases: ansys.modelcenter.workflow.api.IDatapinReferenceBase
Represents a single element in an reference array datapin.
Note
This class should not be directly instantiated by clients. Get a
Workflowobject from an instantiatedEngineinstance and use it to get a validReferenceArrayDatapininstance, which can then be indexed to get an object of this type.
Overview#
Import detail#
from ansys.modelcenter.workflow.grpc_modelcenter.reference_datapin import ReferenceArrayDatapinElement
Property detail#
- property ReferenceArrayDatapinElement.equation: str#
Reference equation describing the values that the datapin references.
- Returns:
strReference equation.
- property ReferenceArrayDatapinElement.is_direct: bool#
Flag indicating if the datapin is a direct reference.
Direct reference datapins refer to one specific datapin only. Their equations are just the name of one other datapin. Only direct-reference datapins that refer to a datapin that can be set directly can use the
set_state()method to set the referenced datapin.- Returns:
- bool
Trueif the datapin is a direct reference,Falseotherwise.
Method detail#
- ReferenceArrayDatapinElement.get_state(hid: str | None = None) ansys.tools.variableinterop.VariableState#
Get the state of the reference equation.
- ReferenceArrayDatapinElement.set_state(state: ansys.tools.variableinterop.VariableState) None#
Set the state of the referenced datapin.
This method works only if this is a direct reference. Specifically, it applies if the equation is just the name of a single other datapin with no modification. If it is not a direct reference, a
ValueErroris raised. AValueErroris also raised if the referenced datapin is not allowed to be set directly in the first place. For example, if it is an output or linked input.