diff --git a/_unittest/test_01_Design.py b/_unittest/test_01_Design.py index 529647d8c72..da1262e0a5e 100644 --- a/_unittest/test_01_Design.py +++ b/_unittest/test_01_Design.py @@ -498,3 +498,7 @@ def test_42_save_project_with_file_name(self): assert not os.path.exists(new_parent_dir) self.aedtapp.save_project(file_name=new_project) assert os.path.isfile(new_project) + + def test_43_edit_notes(self): + assert self.aedtapp.edit_notes("this a test") + assert not self.aedtapp.edit_notes(1) diff --git a/src/ansys/aedt/core/application/design.py b/src/ansys/aedt/core/application/design.py index 87aea886a94..4a39dd017b9 100644 --- a/src/ansys/aedt/core/application/design.py +++ b/src/ansys/aedt/core/application/design.py @@ -4203,6 +4203,40 @@ def set_temporary_directory(self, path): self.odesktop.SetTempDirectory(path) return True + @pyaedt_function_handler() + def edit_notes(self, text): + """Edit notes. + + Notes are used to document aspects of designs only. + + Parameters + ---------- + text : str + Text to be added in the design notes. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + + References + ---------- + + >>> oDesign.EditNotes() + + Examples + -------- + + >>> from ansys.aedt.core import Maxwell3d + >>> m3d = Maxwell3d() + >>> m3d.edit_notes("This is an example.") + """ + if not isinstance(text, str): + self.logger.error("Input type of edit_notes is not valid.") + return False + self.odesign.EditNotes(text) + return True + class DesignSettings: """Get design settings for the current AEDT app.