Skip to content

Commit c89c10f

Browse files
FIX: _import_cad (#6764)
Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent 4d61328 commit c89c10f

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

doc/changelog.d/6764.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_import_cad

src/ansys/aedt/core/hfss3dlayout.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,13 +1408,13 @@ def _import_cad(
14081408
aedb_path = aedb_path.replace(old_name, project_name)
14091409
self.logger.warning("aedb_exists. Renaming it to %s", project_name)
14101410
if xml_path is None:
1411-
xml_path = Path("")
1411+
xml_path = Path("").name
14121412
elif Path(xml_path).suffix == ".tech":
1413-
xml_path = Path(tech_to_control_file(xml_path))
1413+
xml_path = Path(tech_to_control_file(xml_path)).name
14141414
if cad_format == "gds":
1415-
method(str(cad_path), str(aedb_path), str(xml_path), "")
1415+
method(str(cad_path), str(aedb_path), xml_path, "")
14161416
else:
1417-
method(str(cad_path), str(aedb_path), str(xml_path))
1417+
method(str(cad_path), str(aedb_path), xml_path)
14181418

14191419
if set_as_active:
14201420
self._close_edb()

tests/system/general/test_41_3dlayout_modeler.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,7 @@ def test_37_import_gds(self):
728728
os.path.join(TESTS_GENERAL_PATH, "example_models", "cad", "GDS", "gds1.tech")
729729
)
730730
aedb_file = os.path.join(self.local_scratch.path, generate_unique_name("gds_out") + ".aedb")
731+
assert self.aedtapp.import_gds(gds_file, output_dir=aedb_file)
731732
assert self.aedtapp.import_gds(gds_file, output_dir=aedb_file, control_file=control_file)
732733

733734
@pytest.mark.skipif(is_linux, reason="Fails in linux")

0 commit comments

Comments
 (0)