ansys.dyna.core.lib.card_writer#

Function to write cards.

Functions#

write_cards(cards, buf, write_format[, comment, ...])

Write the cards.

Module Contents#

ansys.dyna.core.lib.card_writer.write_cards(cards: List[ansys.dyna.core.lib.card_interface.CardInterface], buf: TextIO, write_format: ansys.dyna.core.lib.format_type.format_type, comment: bool | None = True, retain_parameters: bool = False, parameter_set: ansys.dyna.core.lib.parameters.ParameterSet | None = None, keyword_id: str | None = None, uri_prefix: str | None = None)[source]#

Write the cards.

Parameters:
cardslist of CardInterface

The cards to write.

bufTextIO

Buffer to write to.

write_formatformat_type

The format to use for writing.

commentbool, optional

Whether to write field name comments. Default True.

retain_parametersbool, optional

If True, write original parameter references instead of values. If False and parameter_set is provided (keyword on deck), resolve refs to current values at write time.

parameter_setParameterSet, optional

Set containing refs and values. When retain_parameters=True, used to look up ref strings for write-back. When retain_parameters=False, used to resolve refs to current values.

keyword_idstr, optional

The keyword’s ID for building URI paths when parameter_set is provided.