ReferenceArrayDatapinElement ============================ .. py: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) :canonical: ansys.modelcenter.workflow.grpc_modelcenter.reference_datapin.ReferenceArrayDatapinElement Bases: :py:obj:`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 ``Workflow`` object from an instantiated ``Engine`` instance and use it to get a valid ``ReferenceArrayDatapin`` instance, which can then be indexed to get an object of this type. .. !! processed by numpydoc !! Overview -------- .. py:currentmodule:: ReferenceArrayDatapinElement .. tab-set:: .. tab-item:: Methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~get_state` - Get the state of the reference equation. * - :py:attr:`~set_state` - Set the state of the referenced datapin. .. tab-item:: Properties .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~equation` - Reference equation describing the values that the datapin * - :py:attr:`~is_direct` - Flag indicating if the datapin is a direct reference. Import detail ------------- .. code-block:: python from ansys.modelcenter.workflow.grpc_modelcenter.reference_datapin import ReferenceArrayDatapinElement Property detail --------------- .. py:property:: equation :canonical: ansys.modelcenter.workflow.grpc_modelcenter.reference_datapin.ReferenceArrayDatapinElement.equation :type: str Reference equation describing the values that the datapin references. :Returns: :class:`python:str` Reference equation. .. !! processed by numpydoc !! .. py:property:: is_direct :canonical: ansys.modelcenter.workflow.grpc_modelcenter.reference_datapin.ReferenceArrayDatapinElement.is_direct :type: 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: :ref:`bool ` ``True`` if the datapin is a direct reference, ``False`` otherwise. .. !! processed by numpydoc !! Method detail ------------- .. py:method:: get_state(hid: Optional[str] = None) -> ansys.tools.variableinterop.VariableState Get the state of the reference equation. .. !! processed by numpydoc !! .. py:method:: 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 ``ValueError`` is raised. A ``ValueError`` is 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. .. !! processed by numpydoc !!