Skip to content

Commit

Permalink
FIX: properties in rmxprt.py to make it back compatible with 23R2. (#…
Browse files Browse the repository at this point in the history
…4961)

Co-authored-by: maxcapodi78 <Shark78>
  • Loading branch information
maxcapodi78 authored Jul 30, 2024
1 parent 77571c1 commit 5da1dc4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
15 changes: 9 additions & 6 deletions pyaedt/modeler/cad/elements3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -1396,12 +1396,15 @@ def __init__(self, node, child_object, first_level=False, get_child_obj_arg=None
self.children = {}
self.auto_update = True
name = None
if get_child_obj_arg is None:
child_names = [i for i in list(child_object.GetChildNames()) if not i.startswith("CachedBody")]
else:
child_names = [
i for i in list(child_object.GetChildNames(get_child_obj_arg)) if not i.startswith("CachedBody")
]
try:
if get_child_obj_arg is None:
child_names = [i for i in list(child_object.GetChildNames()) if not i.startswith("CachedBody")]
else:
child_names = [
i for i in list(child_object.GetChildNames(get_child_obj_arg)) if not i.startswith("CachedBody")
]
except Exception: # pragma: no cover
child_names = []
for i in child_names:
if not name:
name = i
Expand Down
4 changes: 2 additions & 2 deletions pyaedt/rmxprt.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self, app):

@property
def properties(self):
"""Object history.
"""Object parameters.
Returns
-------
Expand Down Expand Up @@ -121,7 +121,7 @@ class Shaft(RMXprtModule):
class Machine(RMXprtModule):
"""Provides rotor properties."""

component = ""
component = "General"


class Circuit(RMXprtModule):
Expand Down

0 comments on commit 5da1dc4

Please sign in to comment.