TextCard#

class ansys.dyna.core.lib.text_card.TextCard(name: str, content: str = None, format=format_type.default)#

Bases: ansys.dyna.core.lib.card_interface.CardInterface

Abstract base class for all the implementations of keyword cards.

Overview#

read

Reads the card data from an input text buffer.

write

Renders the card in the dyna keyword format.

value

bounded

Text cards are always unbounded.

active

Text cards are always active.

format

Get the card format type.

Import detail#

from ansys.dyna.core.lib.text_card import TextCard

Property detail#

property TextCard.value: str#
property TextCard.bounded: bool#

Text cards are always unbounded.

property TextCard.active: bool#

Text cards are always active.

property TextCard.format: ansys.dyna.core.lib.format_type.format_type#

Get the card format type.

Method detail#

TextCard.read(buf: TextIO, parameter_set: ansys.dyna.core.lib.parameters.ParameterSet = None) None#

Reads the card data from an input text buffer.

TextCard.write(format: ansys.dyna.core.lib.format_type.format_type | None = None, buf: TextIO | None = None, comment: bool | None = True) str#

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.