From 0ecf6522da18248cb4c0de4ad5a19ae947e3385a Mon Sep 17 00:00:00 2001 From: Matthew Young <86373761+myoung301@users.noreply.github.com> Date: Wed, 1 May 2024 16:04:26 -0500 Subject: [PATCH] Revert "Fix active design selection behavior for Emit designs (#4587)" This reverts commit feb936993fe074a5b4426fe194ade554c6569837. --- _unittest_solvers/test_26_emit.py | 13 ++++++------- pyaedt/emit.py | 3 +++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/_unittest_solvers/test_26_emit.py b/_unittest_solvers/test_26_emit.py index adabbac4cc8..91cfc2b9fff 100644 --- a/_unittest_solvers/test_26_emit.py +++ b/_unittest_solvers/test_26_emit.py @@ -7,7 +7,6 @@ import pytest from pyaedt import Emit -from pyaedt import generate_unique_project_name from pyaedt.emit_core.emit_constants import EmiCategoryFilter from pyaedt.emit_core.emit_constants import InterfererType from pyaedt.emit_core.emit_constants import ResultType @@ -374,7 +373,7 @@ def test_07_antenna_component(self, add_app): reason="Skipped on versions earlier than 2023.2", ) def test_08_revision_generation(self, add_app): - self.aedtapp = add_app(application=Emit, project_name=generate_unique_project_name()) + self.aedtapp = add_app(application=Emit) assert len(self.aedtapp.results.revisions) == 0 # place components and generate the appropriate number of revisions rad1 = self.aedtapp.modeler.components.create_component("UE - Handheld") @@ -444,7 +443,7 @@ def test_08_revision_generation(self, add_app): reason="Skipped on versions earlier than 2023.2", ) def test_09_manual_revision_access_test_getters(self, add_app): - self.aedtapp = add_app(application=Emit, project_name=generate_unique_project_name()) + self.aedtapp = add_app(application=Emit) rad1 = self.aedtapp.modeler.components.create_component("UE - Handheld") ant1 = self.aedtapp.modeler.components.create_component("Antenna") rad2 = self.aedtapp.modeler.components.create_component("Bluetooth") @@ -513,7 +512,7 @@ def test_09_manual_revision_access_test_getters(self, add_app): reason="Skipped on versions earlier than 2023.2", ) def test_10_radio_band_getters(self, add_app): - self.aedtapp = add_app(application=Emit, project_name=generate_unique_project_name()) + self.aedtapp = add_app(application=Emit) rad1, ant1 = self.aedtapp.modeler.components.create_radio_antenna("New Radio") rad2, ant2 = self.aedtapp.modeler.components.create_radio_antenna("Bluetooth Low Energy (LE)") rad3, ant3 = self.aedtapp.modeler.components.create_radio_antenna("WiFi - 802.11-2012") @@ -730,7 +729,7 @@ def test_14_version(self, add_app): reason="Skipped on versions earlier than 2023.2", ) def test_15_basic_run(self, add_app): - self.aedtapp = add_app(application=Emit, project_name=generate_unique_project_name()) + self.aedtapp = add_app(application=Emit) assert len(self.aedtapp.results.revisions) == 0 # place components and generate the appropriate number of revisions rad1 = self.aedtapp.modeler.components.create_component("UE - Handheld") @@ -812,7 +811,7 @@ def test_15_basic_run(self, add_app): reason="Skipped on versions earlier than 2024.1", ) def test_16_optimal_n_to_1_feature(self, add_app): - self.aedtapp = add_app(application=Emit, project_name=generate_unique_project_name()) + self.aedtapp = add_app(application=Emit) # place components and generate the appropriate number of revisions rad1 = self.aedtapp.modeler.components.create_component("Bluetooth") ant1 = self.aedtapp.modeler.components.create_component("Antenna") @@ -868,7 +867,7 @@ def test_16_optimal_n_to_1_feature(self, add_app): reason="Skipped on versions earlier than 2023.2", ) def test_17_availability_1_to_1(self, add_app): - self.aedtapp = add_app(application=Emit, project_name=generate_unique_project_name()) + self.aedtapp = add_app(application=Emit) # place components and generate the appropriate number of revisions rad1 = self.aedtapp.modeler.components.create_component("MD400C") ant1 = self.aedtapp.modeler.components.create_component("Antenna") diff --git a/pyaedt/emit.py b/pyaedt/emit.py index f67e403be6e..70b37b3fa13 100644 --- a/pyaedt/emit.py +++ b/pyaedt/emit.py @@ -3,6 +3,7 @@ import warnings from pyaedt import emit_core +from pyaedt import generate_unique_project_name from pyaedt.application.Design import Design from pyaedt.emit_core.Couplings import CouplingsEmit from pyaedt.emit_core.emit_constants import EMIT_VALID_UNITS @@ -113,6 +114,8 @@ def __init__( port=0, aedt_process_id=None, ): + if projectname is None: + projectname = generate_unique_project_name() self.__emit_api_enabled = False self.results = None """Constructor for the ``FieldAnalysisEmit`` class"""