From b590d973924f2fa5718f87b23282914c979b95f9 Mon Sep 17 00:00:00 2001 From: Samuel Lopez <85613111+Samuelopez-ansys@users.noreply.github.com> Date: Wed, 27 Nov 2024 14:32:20 +0100 Subject: [PATCH] FIX: Edit sources from file in HFSS 3DLayout inversed order (#5490) --- src/ansys/aedt/core/hfss3dlayout.py | 3 +-- .../workflows/hfss3dlayout/images/large/push.png | Bin 0 -> 1987 bytes tests/system/general/test_41_3dlayout_modeler.py | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 src/ansys/aedt/core/workflows/hfss3dlayout/images/large/push.png diff --git a/src/ansys/aedt/core/hfss3dlayout.py b/src/ansys/aedt/core/hfss3dlayout.py index ca3b0b85346..307ffd1f82a 100644 --- a/src/ansys/aedt/core/hfss3dlayout.py +++ b/src/ansys/aedt/core/hfss3dlayout.py @@ -2292,13 +2292,12 @@ def find_scale(data, header_line): self.oboundary.EditExcitations( [ "NAME:Excitations", - [source, f"pwl({ds_name_mag}, Freq)", f"pwl({ds_name_phase}, Freq)"], + [source, f"pwl({ds_name_phase}, Freq)", f"pwl({ds_name_mag}, Freq)"], ], ["NAME:Terminations", [source, False, str(impedance) + "ohm", "0ohm"]], ",".join(str_val), [], ) - self.logger.info("Source Excitation updated with Dataset.") return True self.logger.error("Port not found.") diff --git a/src/ansys/aedt/core/workflows/hfss3dlayout/images/large/push.png b/src/ansys/aedt/core/workflows/hfss3dlayout/images/large/push.png new file mode 100644 index 0000000000000000000000000000000000000000..2eb7c639efbcd451615c5c23b2e8d40d9207fc18 GIT binary patch literal 1987 zcmV;!2R!(RP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vG&=l}pD=mCOb1snhX2Utl&K~z{ry;s+k z+c*;S|Nqs#?1Sy;b}L7UIcG756v4Z|htbf`g1{9zcTvG4n7oOv^Urss8`&objU%2CrelRWPx5aF5tly0Ci zblk>nQk@9ODC;uLyqQ1K^SaPynR)%0C+`!0f+`o=)NM-u4s7Ea-qaH6{`gRC@O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ec6#03$=X7gbJsn=~y4cu64`VnR;U;)NV<~Hv;eoAigPhES2I5kD5Qw zE^H|HE;QBi2@I>C93V{y51r@lGO{-Fr34kOb!!RaOR4huO3F(xDBsh~%gBEY`Tm(NBt>unAnHh2Fl^g?NB&HLR@1a;lV7dN z#@p?78h^F!v(uJ8rn4EO2N9>2eZR~?^Yi@SGtJNM*5vu!y1dK5mSs)^z{{UIo VT`|B^wXXmG002ovPDHLkV1mLSy5|4@ literal 0 HcmV?d00001 diff --git a/tests/system/general/test_41_3dlayout_modeler.py b/tests/system/general/test_41_3dlayout_modeler.py index d05fafd4e00..cc4260d976b 100644 --- a/tests/system/general/test_41_3dlayout_modeler.py +++ b/tests/system/general/test_41_3dlayout_modeler.py @@ -336,6 +336,7 @@ def test_13a_create_edge_port(self): assert self.aedtapp.create_edge_port("line1", 3, False) assert len(self.aedtapp.excitations) > 0 time_domain = os.path.join(TESTS_GENERAL_PATH, "example_models", test_subfolder, "Sinusoidal.csv") + assert self.aedtapp.boundaries[0].object_properties.props["Magnitude"] == "1V" assert self.aedtapp.edit_source_from_file( source=port_wave.name, input_file=time_domain, @@ -344,6 +345,7 @@ def test_13a_create_edge_port(self): y_scale=1e-3, data_format="Voltage", ) + assert self.aedtapp.boundaries[0].object_properties.props["Magnitude"] != "1V" self.aedtapp.boundaries[0].object_properties.props["Boundary Type"] = "PEC" assert list(self.aedtapp.oboundary.GetAllBoundariesList())[0] == self.aedtapp.boundaries[0].name