params Module

Inheritance diagram of pyNastran.bdf.cards.params
defines the following card:
  • PARAM
class pyNastran.bdf.cards.params.PARAM(key, values, comment='')[source]

Bases: pyNastran.bdf.cards.base_card.BaseCard

Creates a PARAM card

Parameters:
key : str

the name of the PARAM

values : int/float/str/List

varies depending on the type of PARAM

comment : str; default=’‘

a comment for the card

classmethod _init_from_empty()[source]
classmethod add_card(card, comment='')[source]

Adds a PARAM card from BDF.add_card(...)

Parameters:
card : BDFCard()

a BDFCard object

comment : str; default=’‘

a comment for the card

raw_fields(self)[source]
repr_fields(self)[source]

Gets the fields in their simplified form

Returns:
fields : List[varies]

the fields that define the card

type = 'PARAM'
update_values(self, value1=None, value2=None)[source]

Updates value1 and value2. Performs type checking based on the PARAM type after setting any default value(s).

Parameters:
value1 : varies; default=None

the main value

value2 : varies; default=None

optional value

If you want to access the data directly, use:
>>> param = bdf.params[‘POST’]
>>> param.values[0] = -1 # value1
>>> param.values[1] = 3 # value2
>>>
.. note:: Most PARAM cards only have one value. Some have two.
write_card(self, size=8, is_double=False)[source]

Writes the card with the specified width and precision

Parameters:
size : int (default=8)

size of the field; {8, 16}

is_double : bool (default=False)

is this card double precision

Returns:
msg : str

the string representation of the card