Skip to content

Commit

Permalink
FIX: Use Get3DComponentDefinitionNames to obtain 3DComponent instances (
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuelopez-ansys authored Jan 14, 2025
1 parent 334d730 commit c35e71b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/ansys/aedt/core/modules/boundary/layout_boundary.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ def _child_object(self):
"""
child_object = None
for el in self._app.oeditor.GetChildNames("ComponentDefinition"):
component_definition = self._app.oeditor.Get3DComponentDefinitionNames()

for el in component_definition:
design_childs = self._app.get_oo_object(self._app.oeditor, el).GetChildNames()
if self._name in design_childs:
child_object = self._app.get_oo_object(self._app.oeditor, f"{el}\\{self._name}")
Expand Down
8 changes: 4 additions & 4 deletions src/ansys/aedt/core/modules/mesh_icepak.py
Original file line number Diff line number Diff line change
Expand Up @@ -933,12 +933,12 @@ def assignment(self):
for sr in sub_regions:
p1 = []
p2 = []
if "Part Names" in self._app.modeler[sr].history().props:
p1 = self._app.modeler[sr].history().props.get("Part Names", None)
if "Part Names" in self._app.modeler[sr].history().properties:
p1 = self._app.modeler[sr].history().properties.get("Part Names", None)
if not isinstance(p1, list):
p1 = [p1]
elif "Submodel Names" in self._app.modeler[sr].history().props:
p2 = self._app.modeler[sr].history().props.get("Submodel Names", None)
elif "Submodel Names" in self._app.modeler[sr].history().properties:
p2 = self._app.modeler[sr].history().properties.get("Submodel Names", None)
if not isinstance(p2, list):
p2 = [p2]
p1 += p2
Expand Down

0 comments on commit c35e71b

Please sign in to comment.