build_keyword
Writes a single LS-DYNA keyword card as validated text using PyDYNA definitions, rejecting unknown fields and wrong value types, with optional insertion into an analysis.
Instructions
Write one keyword card as LS-DYNA text, laid out by PyDYNA's own definition of the keyword
(nothing here is typed from memory). Unknown field names and wrong value types are refused.
Fields you leave out are written with the manual default (PyDYNA writes it explicitly, for
example SPALL 2.0): the reply's defaults_written lists them. After writing, the text is read
back and every value you gave must come out unchanged, else ok is false and the field is named
(value too wide for its column, a float that would lose digits, a field of an inactive
conditional card). A field name that occurs in several cards must be addressed as
"card3.name" (card numbers as in describe_keyword). title adds the _TITLE option (printable
ASCII only, no control characters). Cannot do: keywords with repeating-row (table or point)
cards such as DEFINE_CURVE or *PART with a table, and keywords with file or path fields; use
add_keyword_commands with explicit text for those. The same safety checks as
add_keyword_commands apply. With add_to_analysis=true the card is added as a Keyword Snippet
(scope_path as in add_keyword_commands); otherwise the text is only returned.
Args: name (e.g. MAT_JOHNSON_COOK), values (field name -> value, see describe_keyword),
add_to_analysis, analysis_index, scope_path, title
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| title | No | ||
| values | Yes | ||
| scope_path | No | ||
| analysis_index | No | ||
| add_to_analysis | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |