Skip to content

Commit

Permalink
FIX: ACF file variable override bug (#5199)
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuelopez-ansys authored Sep 24, 2024
1 parent 5e162b3 commit 4defccd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
Binary file modified _unittest_solvers/example_models/T00/satellite_231.aedtz
Binary file not shown.
8 changes: 0 additions & 8 deletions _unittest_solvers/test_00_analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ def test_01a_sbr_link_array(self, sbr_platform, array):
ffdata = sbr_platform.get_antenna_data(frequencies=12e9, sphere="3D")
ffdata2 = sbr_platform.get_antenna_data(frequencies=12e9, sphere="3D", overwrite=False)


ffdata.farfield_data.plot_cut(quantity="RealizedGain", primary_sweep="theta", secondary_sweep_value=[75],
theta=20,
title="Azimuth at {}Hz".format(ffdata.farfield_data.frequency),
Expand All @@ -127,13 +126,6 @@ def test_01a_sbr_link_array(self, sbr_platform, array):
output_file=os.path.join(self.local_scratch.path, "2d1_array.jpg"))
assert os.path.exists(os.path.join(self.local_scratch.path, "2d1_array.jpg"))

farfield_plot = ffdata2.farfield_data.plot_3d(quantity="RealizedGain",
output_file=os.path.join(self.local_scratch.path,
"3d2_array.jpg"),
show=False)
farfield_plot.close()
assert os.path.exists(os.path.join(self.local_scratch.path, "3d2_array.jpg"))

def test_01b_sbr_create_vrt(self, sbr_app):
sbr_app.rename_design("vtr")
sbr_app.modeler.create_sphere([10, 10, 10], 5, material="copper")
Expand Down
10 changes: 5 additions & 5 deletions src/ansys/aedt/core/application/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1811,17 +1811,17 @@ def analyze_setup(
start = time.time()
set_custom_dso = False
active_config = self._desktop.GetRegistryString(r"Desktop/ActiveDSOConfigurations/" + self.design_type)
if acf_file:
if acf_file: # pragma: no cover
self._desktop.SetRegistryFromFile(acf_file)
name = ""
acf_name = ""
with open_file(acf_file, "r") as f:
lines = f.readlines()
for line in lines:
if "ConfigName" in line:
name = line.strip().split("=")[1]
acf_name = line.strip().split("=")[1].strip("'")
break
if name:
success = self.set_registry_key(r"Desktop/ActiveDSOConfigurations/" + self.design_type, name)
if acf_name:
success = self.set_registry_key(r"Desktop/ActiveDSOConfigurations/" + self.design_type, acf_name)
if success:
set_custom_dso = True
elif self.design_type not in ["RMxprtSolution", "ModelCreation"] and (gpus or tasks or cores):
Expand Down

0 comments on commit 4defccd

Please sign in to comment.