:class:`Card` ============= .. py:class:: ansys.dyna.core.lib.card.Card(fields: List[ansys.dyna.core.lib.field.Field], active_func=None, format=format_type.default) Bases: :py:obj:`ansys.dyna.core.lib.card_interface.CardInterface` Abstract base class for all the implementations of keyword cards. .. !! processed by numpydoc !! .. py:currentmodule:: Card Overview -------- .. tab-set:: .. tab-item:: Methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~read` - Reads the card data from an input text buffer. * - :py:attr:`~write` - Renders the card in the dyna keyword format. * - :py:attr:`~get_value` - gets the value of the field in the card * - :py:attr:`~set_value` - sets the value of the field in the card .. tab-item:: Properties .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~format` - Get the card format type. * - :py:attr:`~active` - Return whether the card is active. .. tab-item:: Special methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~__repr__` - Returns a console-friendly representation of the desired parameters for the card Import detail ------------- .. code-block:: python from ansys.dyna.core.lib.card import Card Property detail --------------- .. py:property:: format Get the card format type. .. !! processed by numpydoc !! .. py:property:: active :type: bool Return whether the card is active. .. !! processed by numpydoc !! Method detail ------------- .. py:method:: read(buf: TextIO, parameter_set: ansys.dyna.core.lib.parameters.ParameterSet = None) -> bool Reads the card data from an input text buffer. .. !! processed by numpydoc !! .. py:method:: write(format: Optional[ansys.dyna.core.lib.format_type.format_type] = None, buf: Optional[TextIO] = None, comment: Optional[bool] = True) -> Union[str, None] Renders the card in the dyna keyword format. :param buf: Buffer to write to. If None, the output is returned as a string :param format: format_type to use. Default to standard. .. !! processed by numpydoc !! .. py:method:: get_value(prop: str) -> Any gets the value of the field in the card .. !! processed by numpydoc !! .. py:method:: set_value(prop: str, value: Any) -> None sets the value of the field in the card .. !! processed by numpydoc !! .. py:method:: __repr__() -> str Returns a console-friendly representation of the desired parameters for the card .. !! processed by numpydoc !!