From 87ca0ccd41956be8257bb12e7cfbbb842bda6975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Morais?= <146729917+SMoraisAnsys@users.noreply.github.com> Date: Fri, 20 Dec 2024 12:21:52 +0100 Subject: [PATCH 1/2] FIX: PyAEDT installer with wheelhouse (#5599) --- .../Resources/pyaedt_installer_from_aedt.py | 143 +++++++++--------- 1 file changed, 71 insertions(+), 72 deletions(-) diff --git a/doc/source/Resources/pyaedt_installer_from_aedt.py b/doc/source/Resources/pyaedt_installer_from_aedt.py index f92cffe78a6..6b4451a9c00 100644 --- a/doc/source/Resources/pyaedt_installer_from_aedt.py +++ b/doc/source/Resources/pyaedt_installer_from_aedt.py @@ -79,10 +79,10 @@ def run_pyinstaller_from_c_python(oDesktop): if is_student_version(oDesktop): command.append("--student") if is_linux: - command.extend(['--edt_root="{}"'.format(edt_root), '--python_version="{}"'.format(python_version)]) + command.extend([r'--edt_root={}'.format(edt_root), '--python_version="{}"'.format(python_version)]) if wheelpyaedt: - command.extend(['--wheel="{}"'.format(wheelpyaedt)]) + command.extend([r'--wheel={}'.format(wheelpyaedt)]) oDesktop.AddMessage("", "", 0, "Installing PyAEDT.") return_code = subprocess.call(command) @@ -179,8 +179,26 @@ def parse_arguments_for_pyaedt_installer(args=None): parser.error("No arguments given!") return args +def unzip_if_zip(path): + """Unzip path if it is a ZIP file.""" + import zipfile + + # Extracted folder + unzipped_path = path + if path.suffix == '.zip': + unzipped_path = path.parent / path.stem + if unzipped_path.exists(): + shutil.rmtree(unzipped_path, ignore_errors=True) + with zipfile.ZipFile(path, "r") as zip_ref: + # Extract all contents to a directory. (You can specify a different extraction path if needed.) + zip_ref.extractall(unzipped_path) + return unzipped_path + def install_pyaedt(): + """Install PyAEDT in CPython.""" + from pathlib import Path + # This is called when run from CPython args = parse_arguments_for_pyaedt_installer() @@ -189,136 +207,117 @@ def install_pyaedt(): python_version = "3_7" if is_windows: - venv_dir = os.path.join(os.environ["APPDATA"], VENV_DIR_PREFIX, python_version) - python_exe = os.path.join(venv_dir, "Scripts", "python.exe") - pip_exe = os.path.join(venv_dir, "Scripts", "pip.exe") + venv_dir = Path(os.environ["APPDATA"], VENV_DIR_PREFIX, python_version) + python_exe = venv_dir / "Scripts" / "python.exe" + pip_exe = venv_dir / "Scripts" / "pip.exe" else: - venv_dir = os.path.join(os.environ["HOME"], VENV_DIR_PREFIX, python_version) - python_exe = os.path.join(venv_dir, "bin", "python") - pip_exe = os.path.join(venv_dir, "bin", "pip") + venv_dir = Path(os.environ["HOME"], VENV_DIR_PREFIX, python_version) + python_exe = venv_dir / "bin" / "python" + pip_exe = venv_dir / "bin" / "pip" os.environ["ANSYSEM_ROOT{}".format(args.version)] = args.edt_root ld_library_path_dirs_to_add = [ - "{}/commonfiles/CPython/{}/linx64/Release/python/lib".format( + r"{}/commonfiles/CPython/{}/linx64/Release/python/lib".format( args.edt_root, args.python_version.replace(".", "_") ), - "{}/common/mono/Linux64/lib64".format(args.edt_root), - "{}".format(args.edt_root), + r"{}/common/mono/Linux64/lib64".format(args.edt_root), + r"{}".format(args.edt_root), ] if args.version < "232": - ld_library_path_dirs_to_add.append("{}/Delcross".format(args.edt_root)) + ld_library_path_dirs_to_add.append(r"{}/Delcross".format(args.edt_root)) os.environ["LD_LIBRARY_PATH"] = ":".join(ld_library_path_dirs_to_add) + ":" + os.getenv("LD_LIBRARY_PATH", "") - os.environ["TK_LIBRARY"] = "{}/commonfiles/CPython/{}/linx64/Release/python/lib/tk8.5".format( + os.environ["TK_LIBRARY"] = r"{}/commonfiles/CPython/{}/linx64/Release/python/lib/tk8.5".format( args.edt_root, args.python_version.replace(".", "_") ) - os.environ["TCL_LIBRARY"] = "{}/commonfiles/CPython/{}/linx64/Release/python/lib/tcl8.5".format( + os.environ["TCL_LIBRARY"] = r"{}/commonfiles/CPython/{}/linx64/Release/python/lib/tcl8.5".format( args.edt_root, args.python_version.replace(".", "_") ) - if not os.path.exists(venv_dir): - - if args.version == "231": - subprocess.call([sys.executable, "-m", "venv", venv_dir, "--system-site-packages"]) + if not venv_dir.exists(): + print("Creating the virtual environment in {}".format(venv_dir)) + if args.version <= "231": + subprocess.call([sys.executable, "-m", "venv", str(venv_dir), "--system-site-packages"]) else: - subprocess.call([sys.executable, "-m", "venv", venv_dir]) + subprocess.call([sys.executable, "-m", "venv", str(venv_dir)]) - if args.wheel and os.path.exists(args.wheel): - wheel_pyaedt = args.wheel - if wheel_pyaedt.endswith(".zip"): - import zipfile - - unzipped_path = os.path.join( - os.path.dirname(wheel_pyaedt), os.path.splitext(os.path.basename(wheel_pyaedt))[0] - ) - if os.path.exists(unzipped_path): - shutil.rmtree(unzipped_path, ignore_errors=True) - with zipfile.ZipFile(wheel_pyaedt, "r") as zip_ref: - # Extract all contents to a directory. (You can specify a different extraction path if needed.) - zip_ref.extractall(unzipped_path) - else: - # Extracted folder. - unzipped_path = wheel_pyaedt + if args.wheel and Path(args.wheel).exists(): + print("Installing PyAEDT using provided wheels argument") + unzipped_path = unzip_if_zip(Path(args.wheel)) if args.version <= "231": subprocess.call( [ - pip_exe, + str(pip_exe), "install", "--no-cache-dir", "--no-index", - "--find-links={}".format(unzipped_path), - "pyaedt[all,dotnet]", + r"--find-links={}".format(str(unzipped_path)), + "pyaedt[all,dotnet]=='0.9.0'", ] ) else: subprocess.call( [ - pip_exe, + str(pip_exe), "install", "--no-cache-dir", "--no-index", - "--find-links={}".format(unzipped_path), + r"--find-links={}".format(str(unzipped_path)), "pyaedt[installer]", ] ) else: - subprocess.call([python_exe, "-m", "pip", "install", "--upgrade", "pip"]) - subprocess.call([pip_exe, "--default-timeout=1000", "install", "wheel"]) + print("Installing PyAEDT using online sources") + subprocess.call([str(python_exe), "-m", "pip", "install", "--upgrade", "pip"]) + subprocess.call([str(pip_exe), "--default-timeout=1000", "install", "wheel"]) if args.version <= "231": - subprocess.call([pip_exe, "--default-timeout=1000", "install", "pyaedt[all]=='0.9.0'"]) - subprocess.call([pip_exe, "--default-timeout=1000", "install", "jupyterlab"]) - subprocess.call([pip_exe, "--default-timeout=1000", "install", "ipython", "-U"]) - subprocess.call([pip_exe, "--default-timeout=1000", "install", "ipyvtklink"]) + subprocess.call([str(pip_exe), "--default-timeout=1000", "install", "pyaedt[all]=='0.9.0'"]) + subprocess.call([str(pip_exe), "--default-timeout=1000", "install", "jupyterlab"]) + subprocess.call([str(pip_exe), "--default-timeout=1000", "install", "ipython", "-U"]) + subprocess.call([str(pip_exe), "--default-timeout=1000", "install", "ipyvtklink"]) else: - subprocess.call([pip_exe, "--default-timeout=1000", "install", "pyaedt[installer]"]) + subprocess.call([str(pip_exe), "--default-timeout=1000", "install", "pyaedt[installer]"]) - if args.version == "231": - subprocess.call([pip_exe, "uninstall", "-y", "pywin32"]) + if args.version <= "231": + subprocess.call([str(pip_exe), "uninstall", "-y", "pywin32"]) else: - subprocess.call([pip_exe, "uninstall", "-y", "pyaedt"]) + print("Using existing virtual environment in {}".format(venv_dir)) + subprocess.call([str(pip_exe), "uninstall", "-y", "pyaedt"]) - if args.wheel and os.path.exists(args.wheel): - wheel_pyaedt = args.wheel - import zipfile - - unzipped_path = os.path.join( - os.path.dirname(wheel_pyaedt), os.path.splitext(os.path.basename(wheel_pyaedt))[0] - ) - if os.path.exists(unzipped_path): - shutil.rmtree(unzipped_path, ignore_errors=True) - with zipfile.ZipFile(wheel_pyaedt, "r") as zip_ref: - # Extract all contents to a directory. (You can specify a different extraction path if needed.) - zip_ref.extractall(unzipped_path) + if args.wheel and Path(args.wheel).exists(): + print("Installing PyAEDT using provided wheels argument") + unzipped_path = unzip_if_zip(Path(args.wheel)) if args.version <= "231": subprocess.call( [ - pip_exe, + str(pip_exe), "install", "--no-cache-dir", "--no-index", - "--find-links={}".format(unzipped_path), - "pyaedt[all]=='0.9.0'", + r"--find-links={}".format(str(unzipped_path)), + "pyaedt[all,dotnet]=='0.9.0'", ] ) else: subprocess.call( [ - pip_exe, + str(pip_exe), "install", "--no-cache-dir", "--no-index", - "--find-links={}".format(unzipped_path), + r"--find-links={}".format(str(unzipped_path)), "pyaedt[installer]", ] ) else: + print("Installing PyAEDT using online sources") if args.version <= "231": - subprocess.call([pip_exe, "--default-timeout=1000", "install", "pyaedt[all]=='0.9.0'"]) - subprocess.call([pip_exe, "--default-timeout=1000", "install", "jupyterlab"]) - subprocess.call([pip_exe, "--default-timeout=1000", "install", "ipython", "-U"]) - subprocess.call([pip_exe, "--default-timeout=1000", "install", "ipyvtklink"]) + subprocess.call([str(pip_exe), "pip=1000", "install", "pyaedt[all]=='0.9.0'"]) + subprocess.call([str(pip_exe), "--default-timeout=1000", "install", "jupyterlab"]) + subprocess.call([str(pip_exe), "--default-timeout=1000", "install", "ipython", "-U"]) + subprocess.call([str(pip_exe), "--default-timeout=1000", "install", "ipyvtklink"]) else: - subprocess.call([pip_exe, "--default-timeout=1000", "install", "pyaedt[installer]"]) + subprocess.call([str(pip_exe), "--default-timeout=1000", "install", "pyaedt[installer]"]) sys.exit(0) From 5ea943654e12403a47d7fac959575f4ec027e92e Mon Sep 17 00:00:00 2001 From: Samuel Lopez <85613111+Samuelopez-ansys@users.noreply.github.com> Date: Fri, 20 Dec 2024 14:01:06 +0100 Subject: [PATCH 2/2] FIX: Icepak Mesh Binary Tree (#5600) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- src/ansys/aedt/core/application/design.py | 2 +- .../aedt/core/modules/boundary/common.py | 6 +- .../core/modules/boundary/hfss_boundary.py | 4 +- .../core/modules/boundary/layout_boundary.py | 6 +- .../core/modules/boundary/maxwell_boundary.py | 4 +- src/ansys/aedt/core/modules/mesh.py | 6 +- src/ansys/aedt/core/modules/mesh_icepak.py | 103 +++++++++++++----- src/ansys/aedt/core/modules/solve_setup.py | 10 +- .../aedt/core/visualization/report/common.py | 4 + 9 files changed, 97 insertions(+), 48 deletions(-) diff --git a/src/ansys/aedt/core/application/design.py b/src/ansys/aedt/core/application/design.py index 54795763700..8bd231884eb 100644 --- a/src/ansys/aedt/core/application/design.py +++ b/src/ansys/aedt/core/application/design.py @@ -479,7 +479,7 @@ def boundaries(self) -> List[BoundaryObject]: del self._boundaries[k] for boundary, boundarytype in zip(current_boundaries, current_types): if boundary in self._boundaries: - self._boundaries[boundary]._initialize_bynary_tree() + self._boundaries[boundary]._initialize_tree_node() continue if boundarytype == "MaxwellParameters": maxwell_parameter_type = self.get_oo_property_value(self.odesign, f"Parameters\\{boundary}", "Type") diff --git a/src/ansys/aedt/core/modules/boundary/common.py b/src/ansys/aedt/core/modules/boundary/common.py index b6cb0e6872f..adeeb9ff1a6 100644 --- a/src/ansys/aedt/core/modules/boundary/common.py +++ b/src/ansys/aedt/core/modules/boundary/common.py @@ -93,7 +93,7 @@ def _get_args(self, props=None): return arg @pyaedt_function_handler() - def _initialize_bynary_tree(self): + def _initialize_tree_node(self): if self._child_object: BinaryTreeNode.__init__(self, self._name, self._child_object, False) return True @@ -222,7 +222,7 @@ def __init__(self, app, name, props=None, boundarytype=None, auto_update=True): self.__props = BoundaryProps(self, props) if props else {} self._type = boundarytype self.auto_update = auto_update - self._initialize_bynary_tree() + self._initialize_tree_node() @property def _child_object(self): @@ -542,7 +542,7 @@ def create(self): else: return False - return self._initialize_bynary_tree() + return self._initialize_tree_node() @pyaedt_function_handler() def update(self): diff --git a/src/ansys/aedt/core/modules/boundary/hfss_boundary.py b/src/ansys/aedt/core/modules/boundary/hfss_boundary.py index 3932aec0fd3..decad53ed56 100644 --- a/src/ansys/aedt/core/modules/boundary/hfss_boundary.py +++ b/src/ansys/aedt/core/modules/boundary/hfss_boundary.py @@ -52,7 +52,7 @@ def __init__(self, app, component_name, props, component_type): self._name = component_name self.__props = BoundaryProps(self, props) if props else {} self.auto_update = True - self._initialize_bynary_tree() + self._initialize_tree_node() @property def _child_object(self): @@ -138,7 +138,7 @@ def create(self): self._app.oradfield.AddAntennaOverlay(self._get_args()) elif self.type == "FieldSourceGroup": self._app.oradfield.AddRadFieldSourceGroup(self._get_args()) - return self._initialize_bynary_tree() + return self._initialize_tree_node() @pyaedt_function_handler() def update(self): diff --git a/src/ansys/aedt/core/modules/boundary/layout_boundary.py b/src/ansys/aedt/core/modules/boundary/layout_boundary.py index 18a77b1fa40..775c12195eb 100644 --- a/src/ansys/aedt/core/modules/boundary/layout_boundary.py +++ b/src/ansys/aedt/core/modules/boundary/layout_boundary.py @@ -106,7 +106,7 @@ def __init__(self, app, component_type, component_name, props): self.native_properties = self.__props["NativeComponentDefinitionProvider"] self.auto_update = True - self._initialize_bynary_tree() + self._initialize_tree_node() @property def _child_object(self): @@ -218,7 +218,7 @@ def create(self): self.excitation_name = a[0].split(":")[0] except (GrpcApiError, IndexError): self.excitation_name = self._name - return self._initialize_bynary_tree() + return self._initialize_tree_node() @pyaedt_function_handler() def update(self): @@ -295,7 +295,7 @@ def __init__(self, app, name, props=None, boundarytype="Port"): self.__props = BoundaryProps(self, props) self.type = boundarytype self.auto_update = True - self._initialize_bynary_tree() + self._initialize_tree_node() @property def _child_object(self): diff --git a/src/ansys/aedt/core/modules/boundary/maxwell_boundary.py b/src/ansys/aedt/core/modules/boundary/maxwell_boundary.py index b21f8c8697b..8658dc55c85 100644 --- a/src/ansys/aedt/core/modules/boundary/maxwell_boundary.py +++ b/src/ansys/aedt/core/modules/boundary/maxwell_boundary.py @@ -65,7 +65,7 @@ def __init__(self, app, name, props=None, boundarytype=None): self.auto_update = True self.__reduced_matrices = None self.matrix_assignment = None - self._initialize_bynary_tree() + self._initialize_tree_node() @property def reduced_matrices(self): @@ -177,7 +177,7 @@ def create(self): self._app.o_maxwell_parameters.AssignLayoutForce(self._get_args()) else: return False - return self._initialize_bynary_tree() + return self._initialize_tree_node() @pyaedt_function_handler() def update(self): diff --git a/src/ansys/aedt/core/modules/mesh.py b/src/ansys/aedt/core/modules/mesh.py index 7c5fbcf5772..fa432c43661 100644 --- a/src/ansys/aedt/core/modules/mesh.py +++ b/src/ansys/aedt/core/modules/mesh.py @@ -125,7 +125,7 @@ def __init__(self, mesh, name, props, meshoptype): self._type = meshoptype self._name = name self.auto_update = True - self._initialize_bynary_tree() + self._initialize_tree_node() @property def _child_object(self): @@ -259,7 +259,7 @@ def create(self): self._mesh.omeshmodule.AssignCylindricalGapOp(self._get_args()) else: return False - return self._initialize_bynary_tree() + return self._initialize_tree_node() @pyaedt_function_handler() def update(self, key_name=None, value=None): @@ -405,7 +405,7 @@ def delete(self): return True @pyaedt_function_handler() - def _initialize_bynary_tree(self): + def _initialize_tree_node(self): if self._child_object: BinaryTreeNode.__init__(self, self._name, self._child_object, False) return True diff --git a/src/ansys/aedt/core/modules/mesh_icepak.py b/src/ansys/aedt/core/modules/mesh_icepak.py index b719f12ba01..217d2937e09 100644 --- a/src/ansys/aedt/core/modules/mesh_icepak.py +++ b/src/ansys/aedt/core/modules/mesh_icepak.py @@ -607,7 +607,7 @@ def __contains__(self, x): return x in self.keys() -class MeshRegionCommon(object): +class MeshRegionCommon(BinaryTreeNode): """ Manages Icepak mesh region settings. @@ -626,10 +626,26 @@ def __init__(self, units, app, name): self._name = name self._model_units = units self._app = app - child_object = self._app.get_oo_object(self._app.odesign, f"Mesh/{self._name}") + self._initialize_tree_node() - if child_object: - BinaryTreeNode.__init__(self, self._name, child_object, False) + @property + def _child_object(self): + """Object-oriented properties. + + Returns + ------- + class:`ansys.aedt.core.modeler.cad.elements_3d.BinaryTreeNode` + + """ + child_object = None + design_childs = self._app.get_oo_name(self._app.odesign) + + if "Mesh" in design_childs: + cc = self._app.get_oo_object(self._app.odesign, "Mesh") + cc_names = self._app.get_oo_name(cc) + if self._name in cc_names: + child_object = cc.GetChildObject(self._name) + return child_object @abstractmethod def update(self): @@ -643,26 +659,58 @@ def delete(self): def create(self): """Create the mesh region object.""" + @pyaedt_function_handler() + def _initialize_tree_node(self): + if self._name == "Settings": + return True + + if self._child_object: + child_object = self._app.get_oo_object(self._app.odesign, f"Mesh/{self._name}") + if child_object: + BinaryTreeNode.__init__(self, self._name, child_object, False) + return True + return False + # backward compatibility def __getattr__(self, name): - if "settings" in self.__dict__ and name in self.__dict__["settings"]: - return self.__dict__["settings"][name] - elif name == "UserSpecifiedSettings": - return self.__dict__["manual_settings"] - else: - return self.__dict__[name] + try: + self.__getattribute__(name) + except AttributeError: + if "settings" in self.__dict__ and name in self.__dict__["settings"]: + return self.__dict__["settings"][name] + elif name == "UserSpecifiedSettings": + return self.__dict__["manual_settings"] + else: + return self.__dict__[name] def __setattr__(self, name, value): + skip_properties = [ + "manual_settings", + "settings", + "_name", + "_model_units", + "_app", + "_assignment", + "enable", + "name", + ] + skip_properties_binary = [ + "_props", + "_saved_root_name", + "_get_child_obj_arg", + "_node", + "child_object", + "auto_update", + "_children", + "_BinaryTreeNode__first_level", + ] if ("settings" in self.__dict__) and (name in self.settings): self.settings[name] = value elif name == "UserSpecifiedSettings": self.__dict__["manual_settings"] = value - elif ( - ("settings" in self.__dict__) - and not (name in self.settings) - and name - not in ["manual_settings", "settings", "_name", "_model_units", "_app", "_assignment", "enable", "name"] - ): + elif name in skip_properties_binary: + super(BinaryTreeNode, self).__setattr__(name, value) + elif ("settings" in self.__dict__) and not (name in self.settings) and name not in skip_properties: self._app.logger.error( f"Setting name {name} is not available. Available parameters are: {', '.join(self.settings.keys())}." ) @@ -725,10 +773,7 @@ def create(self): self.delete() self.global_region = Region(self._app) self.global_region.create(self.padding_types, self.padding_values) - child_object = self._app.get_oo_object(self._app.odesign, f"Mesh/{self._name}") - - if child_object: - BinaryTreeNode.__init__(self, self._name, child_object, False) + return self._initialize_tree_node() class MeshRegion(MeshRegionCommon): @@ -796,6 +841,8 @@ def name(self): ------- str """ + if self._child_object: + self._name = str(self.properties["Name"]) return self._name @name.setter @@ -812,7 +859,8 @@ def name(self, value): ) self._app.modeler.refresh() self._name = value - if isinstance(self.assignment, SubRegion): + result = self._initialize_tree_node() + if isinstance(self.assignment, SubRegion) and result: self._assignment = self.assignment @pyaedt_function_handler @@ -834,7 +882,7 @@ def update(self): args += ["UserSpecifiedSettings:=", self.manual_settings] try: self._app.omeshmodule.EditMeshRegion(self.name, args) - return True + return self._initialize_tree_node() except GrpcApiError: # pragma : no cover return False @@ -934,13 +982,10 @@ def create(self): self._app.omeshmodule.AssignMeshRegion(args) self._app.mesh.meshregions.append(self) self._app.modeler.refresh_all_ids() - self._assignment = self.assignment - child_object = self._app.get_oo_object(self._app.odesign, f"Mesh/{self._name}") - - if child_object: - BinaryTreeNode.__init__(self, self._name, child_object, False) - - return True + result = self._initialize_tree_node() + if result: + self._assignment = self.assignment + return result # backward compatibility @property diff --git a/src/ansys/aedt/core/modules/solve_setup.py b/src/ansys/aedt/core/modules/solve_setup.py index f27e155f0e3..c19d96fdaec 100644 --- a/src/ansys/aedt/core/modules/solve_setup.py +++ b/src/ansys/aedt/core/modules/solve_setup.py @@ -72,7 +72,7 @@ def __init__(self, app, solution_type, name="MySetupAuto", is_new_setup=True): self._is_new_setup = is_new_setup # self._init_props(is_new_setup) self.auto_update = True - self._initialize_bynary_tree() + self._initialize_tree_node() @property def _child_object(self): @@ -94,7 +94,7 @@ def _child_object(self): return child_object @pyaedt_function_handler() - def _initialize_bynary_tree(self): + def _initialize_tree_node(self): if self._child_object: BinaryTreeNode.__init__(self, self._name, self._child_object, False) return True @@ -569,7 +569,7 @@ def create(self): arg = ["NAME:" + self._name] _dict2arg(self.props, arg) self.omodule.InsertSetup(soltype, arg) - return self._initialize_bynary_tree() + return self._initialize_tree_node() @pyaedt_function_handler(update_dictionary="properties") def update(self, properties=None): @@ -1172,7 +1172,7 @@ def create(self): arg = ["NAME:SimSetup"] _dict2arg(self.props, arg) self._setup(soltype, arg) - return self._initialize_bynary_tree() + return self._initialize_tree_node() @pyaedt_function_handler() def _setup(self, soltype, arg, newsetup=True): @@ -1913,7 +1913,7 @@ def create(self): arg = ["NAME:" + self.name] _dict2arg(self.props, arg) self.omodule.Add(arg) - return self._initialize_bynary_tree() + return self._initialize_tree_node() @pyaedt_function_handler(update_dictionary="properties") def update(self, properties=None): diff --git a/src/ansys/aedt/core/visualization/report/common.py b/src/ansys/aedt/core/visualization/report/common.py index b4365ce54f9..4889d1a187b 100644 --- a/src/ansys/aedt/core/visualization/report/common.py +++ b/src/ansys/aedt/core/visualization/report/common.py @@ -49,6 +49,7 @@ def __init__(self, report_setup, trace_name, oo=None): @pyaedt_function_handler() def _initialize_tree_node(self): BinaryTreeNode.__init__(self, self.line_name, self._oo, False) + return True @pyaedt_function_handler() def _change_property(self, props_value): @@ -259,6 +260,7 @@ def __init__( @pyaedt_function_handler() def _initialize_tree_node(self): BinaryTreeNode.__init__(self, self.aedt_name, self._oo, False) + return True @property def curve_properties(self): @@ -419,6 +421,8 @@ def _initialize_tree_node(self): oo = self._post.oreportsetup.GetChildObject(self._legacy_props["plot_name"]) if oo: BinaryTreeNode.__init__(self, self._legacy_props["plot_name"], oo, False) + return True + return False @property def __all_props(self):