Skip to content

fixed_rename_design method #1148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions pyaedt/application/Design.py
Original file line number Diff line number Diff line change
Expand Up @@ -2158,8 +2158,8 @@ def load_project(self, project_file, design_name=None, close_active_proj=False):
@pyaedt_function_handler()
def _close_edb(self):
if self.design_type == "HFSS 3D Layout Design": # pragma: no cover
if self.modeler and self.modeler.edb:
self.modeler.edb.close_edb()
if self.modeler and self.modeler._edb:
self.modeler._edb.close_edb()

@pyaedt_function_handler()
def create_dataset1d_design(self, dsname, xlist, ylist, xunit="", yunit=""):
Expand Down Expand Up @@ -2827,7 +2827,6 @@ def rename_design(self, new_name):
>>> oDesign.RenameDesignInstance
"""
self._odesign.RenameDesignInstance(self.design_name, new_name)
self.odesign = new_name
return True

@pyaedt_function_handler()
Expand Down Expand Up @@ -3040,8 +3039,6 @@ def save_project(self, project_file=None, overwrite=True, refresh_obj_ids_after_
>>> oProject.Save
>>> oProject.SaveAs
"""
msg_text = "Saving {0} Project".format(self.project_name)
self.logger.info(msg_text)
if project_file and not os.path.exists(os.path.dirname(project_file)):
os.makedirs(os.path.dirname(project_file))
elif project_file:
Expand All @@ -3051,6 +3048,8 @@ def save_project(self, project_file=None, overwrite=True, refresh_obj_ids_after_
if refresh_obj_ids_after_save:
self.modeler.refresh_all_ids()
self.modeler._refresh_all_ids_from_aedt_file()
msg_text = "Project {0} Saved correctly".format(self.project_name)
self.logger.info(msg_text)
return True

@pyaedt_function_handler()
Expand Down
14 changes: 7 additions & 7 deletions pyaedt/application/design_solutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@
"default_setup": 8,
"default_adaptive": None,
},
"ElectricTransient": {
"name": "ElectricTransient",
"DCConduction": {
"name": "DCConduction",
"options": "XY",
"report_type": None,
"default_setup": 10,
"default_adaptive": "Transient",
"default_setup": 8,
"default_adaptive": None,
},
"ElectroDCConduction": {
"name": "ElectroDCConduction",
"ACConduction": {
"name": "ACConduction",
"options": "XY",
"report_type": None,
"default_setup": 9,
"default_setup": 8,
"default_adaptive": None,
},
},
Expand Down