Skip to content

Commit 606af0c

Browse files
feat: add options to activate with setter (#846)
Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent 9d5710e commit 606af0c

File tree

1,220 files changed

+23889
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,220 files changed

+23889
-0
lines changed

codegen/templates/keyword/option_card_properties.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
self._cards[{{card.index}}].cards[{{card_loop.index-1}}].set_value("{{field.name}}", value)
2929
{% endif %}{# card.indices #}
3030

31+
if value:
32+
self.activate_option("{{field.property_name.upper()}}")
33+
3134
{% endif %}{# not field.readonly #}
3235
{% endif %}{# not field.redundant #}
3336
{% endif %}{# field.used #}

doc/changelog/846.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
add options to activate with setter

src/ansys/dyna/core/keywords/keyword_classes/auto/boundary_prescribed_motion_node.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,9 @@ def id(self, value: int) -> None:
357357
"""Set the id property."""
358358
self._cards[2].cards[0].set_value("id", value)
359359

360+
if value:
361+
self.activate_option("ID")
362+
360363
@property
361364
def heading(self) -> typing.Optional[str]:
362365
"""Get or set the Descriptor. We suggest using unique descriptions.
@@ -368,3 +371,6 @@ def heading(self, value: str) -> None:
368371
"""Set the heading property."""
369372
self._cards[2].cards[0].set_value("heading", value)
370373

374+
if value:
375+
self.activate_option("HEADING")
376+

src/ansys/dyna/core/keywords/keyword_classes/auto/boundary_prescribed_motion_rigid.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,9 @@ def id(self, value: int) -> None:
356356
"""Set the id property."""
357357
self._cards[2].cards[0].set_value("id", value)
358358

359+
if value:
360+
self.activate_option("ID")
361+
359362
@property
360363
def heading(self) -> typing.Optional[str]:
361364
"""Get or set the Descriptor. We suggest using unique descriptions.
@@ -367,3 +370,6 @@ def heading(self, value: str) -> None:
367370
"""Set the heading property."""
368371
self._cards[2].cards[0].set_value("heading", value)
369372

373+
if value:
374+
self.activate_option("HEADING")
375+

src/ansys/dyna/core/keywords/keyword_classes/auto/boundary_prescribed_motion_rigid_bndout2dynain.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,9 @@ def id(self, value: int) -> None:
382382
"""Set the id property."""
383383
self._cards[3].cards[0].set_value("id", value)
384384

385+
if value:
386+
self.activate_option("ID")
387+
385388
@property
386389
def heading(self) -> typing.Optional[str]:
387390
"""Get or set the Descriptor. We suggest using unique descriptions.
@@ -393,3 +396,6 @@ def heading(self, value: str) -> None:
393396
"""Set the heading property."""
394397
self._cards[3].cards[0].set_value("heading", value)
395398

399+
if value:
400+
self.activate_option("HEADING")
401+

src/ansys/dyna/core/keywords/keyword_classes/auto/boundary_prescribed_motion_rigid_local.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,9 @@ def id(self, value: int) -> None:
356356
"""Set the id property."""
357357
self._cards[2].cards[0].set_value("id", value)
358358

359+
if value:
360+
self.activate_option("ID")
361+
359362
@property
360363
def heading(self) -> typing.Optional[str]:
361364
"""Get or set the Descriptor. We suggest using unique descriptions.
@@ -367,3 +370,6 @@ def heading(self, value: str) -> None:
367370
"""Set the heading property."""
368371
self._cards[2].cards[0].set_value("heading", value)
369372

373+
if value:
374+
self.activate_option("HEADING")
375+

src/ansys/dyna/core/keywords/keyword_classes/auto/boundary_prescribed_motion_rigid_local_bndout2dynain.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,9 @@ def id(self, value: int) -> None:
382382
"""Set the id property."""
383383
self._cards[3].cards[0].set_value("id", value)
384384

385+
if value:
386+
self.activate_option("ID")
387+
385388
@property
386389
def heading(self) -> typing.Optional[str]:
387390
"""Get or set the Descriptor. We suggest using unique descriptions.
@@ -393,3 +396,6 @@ def heading(self, value: str) -> None:
393396
"""Set the heading property."""
394397
self._cards[3].cards[0].set_value("heading", value)
395398

399+
if value:
400+
self.activate_option("HEADING")
401+

src/ansys/dyna/core/keywords/keyword_classes/auto/boundary_prescribed_motion_set.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,9 @@ def id(self, value: int) -> None:
357357
"""Set the id property."""
358358
self._cards[2].cards[0].set_value("id", value)
359359

360+
if value:
361+
self.activate_option("ID")
362+
360363
@property
361364
def heading(self) -> typing.Optional[str]:
362365
"""Get or set the Descriptor. We suggest using unique descriptions.
@@ -368,3 +371,6 @@ def heading(self, value: str) -> None:
368371
"""Set the heading property."""
369372
self._cards[2].cards[0].set_value("heading", value)
370373

374+
if value:
375+
self.activate_option("HEADING")
376+

src/ansys/dyna/core/keywords/keyword_classes/auto/boundary_prescribed_motion_set_segment.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,9 @@ def id(self, value: int) -> None:
257257
"""Set the id property."""
258258
self._cards[1].cards[0].set_value("id", value)
259259

260+
if value:
261+
self.activate_option("ID")
262+
260263
@property
261264
def heading(self) -> typing.Optional[str]:
262265
"""Get or set the Descriptor. We suggest using unique descriptions.
@@ -268,3 +271,6 @@ def heading(self, value: str) -> None:
268271
"""Set the heading property."""
269272
self._cards[1].cards[0].set_value("heading", value)
270273

274+
if value:
275+
self.activate_option("HEADING")
276+

src/ansys/dyna/core/keywords/keyword_classes/auto/boundary_spc_node.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ def id(self, value: int) -> None:
103103
"""Set the id property."""
104104
self._cards[1].cards[0].set_value("id", value)
105105

106+
if value:
107+
self.activate_option("ID")
108+
106109
@property
107110
def heading(self) -> typing.Optional[str]:
108111
"""Get or set the Descriptor. We suggest using unique descriptions.
@@ -114,3 +117,6 @@ def heading(self, value: str) -> None:
114117
"""Set the heading property."""
115118
self._cards[1].cards[0].set_value("heading", value)
116119

120+
if value:
121+
self.activate_option("HEADING")
122+

0 commit comments

Comments
 (0)