Skip to content

Commit 63720ea

Browse files
authored
Improve rpyc on linux supporting also relative ansysedt path (#993)
* Added the possibility to launch aedt in ironpython server using relative. path * Added the possibility to launch aedt in ironpython server using relative. path * improved documentation * improved documentation * improved documentation Co-authored-by: maxcapodi78 <Shark78>
1 parent e0d66f2 commit 63720ea

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

pyaedt/application/Design.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,10 @@ def export_profile(self, setup_name, variation_string="", file_path=None):
11491149
"""
11501150
if not file_path:
11511151
file_path = os.path.join(self.working_directory, generate_unique_name("Profile") + ".prop")
1152-
self.odesign.ExportProfile(setup_name, variation_string, file_path)
1152+
try:
1153+
self.odesign.ExportProfile(setup_name, variation_string, file_path)
1154+
except:
1155+
self.odesign.ExportProfile(setup_name, variation_string, file_path, True)
11531156
self.logger.info("Exported Profile to file {}".format(file_path))
11541157
return file_path
11551158

pyaedt/application/MessageManager.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,10 @@ def _log_on_screen(self, val):
146146
def logger(self):
147147
"""Aedt Logger object."""
148148
if self._log_on_file:
149-
return logging.getLogger(__name__)
149+
try:
150+
return logging.getLogger(__name__)
151+
except:
152+
return None
150153
else:
151154
return None # pragma: no cover
152155

pyaedt/edb.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -486,12 +486,19 @@ def import_layout_pcb(
486486
command += ".exe"
487487
if not working_dir:
488488
working_dir = os.path.dirname(input_file)
489-
cmd_translator = '"{}" "{}" "{}"'.format(command, input_file, os.path.join(working_dir, aedb_name))
490-
cmd_translator += ' -l="{}"'.format(os.path.join(working_dir, "Translator.log"))
489+
if os.name == "posix":
490+
cmd_translator = "{} {} {}".format(command, input_file, os.path.join(working_dir, aedb_name))
491+
cmd_translator += " -l={}".format(os.path.join(working_dir, "Translator.log"))
492+
else:
493+
cmd_translator = '"{}" "{}" "{}"'.format(command, input_file, os.path.join(working_dir, aedb_name))
494+
cmd_translator += ' -l="{}"'.format(os.path.join(working_dir, "Translator.log"))
491495
if not use_ppe:
492496
cmd_translator += " -ppe=false"
493497
if control_file and input_file[-3:] == "gds":
494-
cmd_translator += ' -c="{}"'.format(control_file)
498+
if os.name == "posix":
499+
cmd_translator += " -c={}".format(control_file)
500+
else:
501+
cmd_translator += ' -c="{}"'.format(control_file)
495502
p = subprocess.Popen(cmd_translator)
496503
p.wait()
497504
if not os.path.exists(os.path.join(working_dir, aedb_name)):

0 commit comments

Comments
 (0)