ansys.dyna.core.lib.card_position.CardPosition#

class ansys.dyna.core.lib.card_position.CardPosition#

Position of an option card set within a keyword’s card sequence.

Specified as a URI string of the form "pre/N" or "post/N" where N is a positive integer used to order multiple option sets within the same placement group.

Examples

  • "pre/2" – placed before "pre/1" (further before main cards)

  • "pre/1" – placed immediately before main cards

  • "main/2" – inserted after the 3rd main card (0-based index 2)

  • "post/1" – placed immediately after all main cards

  • "post/3" – placed after "post/1" and "post/2"

Legacy integer values are accepted for backward compatibility: negative integers map to pre (e.g. -2"pre/2"), positive integers map to post (e.g. 1"post/1"). There is no legacy integer form for main.

placement: CardPlacement#
index: int#
classmethod from_str(s: str) CardPosition#

Parse a URI string such as "pre/1" or "post/2".

classmethod from_int(n: int) CardPosition#

Create from a legacy integer value (negative → pre, positive → post).

classmethod parse(value: str | int) CardPosition#

Accept either a URI string or a legacy integer.

__lt__(other: CardPosition) bool#
__le__(other: CardPosition) bool#
__gt__(other: CardPosition) bool#
__ge__(other: CardPosition) bool#
__repr__() str#
__str__() str#