diff --git a/pyaedt/application/Design.py b/pyaedt/application/Design.py index c587e4a0f07..90d34fc41df 100644 --- a/pyaedt/application/Design.py +++ b/pyaedt/application/Design.py @@ -4020,14 +4020,10 @@ def set_temporary_directory(self, temp_dir_path): self.odesktop.SetTempDirectory(temp_dir_path) return True - @pyaedt_function_handler() - def _manipulate_design_settings_inputs(self, k, v): - return v - @property def design_settings(self): """Design settings for the AEDT app.""" - return DesignSettings(self, self._manipulate_design_settings_inputs) + return DesignSettings(self) class DesignSettings: @@ -4039,9 +4035,9 @@ class DesignSettings: >>> oDesign.GetChildObject("Design Settings") """ - def __init__(self, app, manipulate_inputs): + def __init__(self, app): self._app = app - self._manipulate_inputs = manipulate_inputs + self.manipulate_inputs = None try: self.design_settings = self._app.odesign.GetChildObject("Design Settings") except GrpcApiError: # pragma: no cover @@ -4062,7 +4058,7 @@ def __repr__(self): def __setitem__(self, key, value): if key in self.available_properties: - value = self._manipulate_inputs(key, value) + value = self.manipulate_inputs.execute(key, value) key_choices = "{}/Choices".format(key) if key_choices in self.design_settings.GetPropNames(): value_choices = self.design_settings.GetPropValue(key_choices) diff --git a/pyaedt/icepak.py b/pyaedt/icepak.py index 07f9b08d253..f85b288f210 100644 --- a/pyaedt/icepak.py +++ b/pyaedt/icepak.py @@ -175,6 +175,7 @@ def __init__( ) self._monitor = Monitor(self) self._configurations = ConfigurationsIcepak(self) + self.design_settings.manipulate_inputs = IcepakDesignSettingsManipulation() def _init_from_design(self, *args, **kwargs): self.__init__(*args, **kwargs) @@ -6425,8 +6426,9 @@ def create_square_wave_transient_assignment(self, on_value, initial_time_off, on """ return SquareWaveDictionary(on_value, initial_time_off, on_time, off_time, off_value) - @pyaedt_function_handler() - def _manipulate_design_settings_inputs(self, k, v): + +class IcepakDesignSettingsManipulation: + def execute(self, k, v): if k in ["AmbTemp", "AmbRadTemp"]: if k == "AmbTemp" and isinstance(v, (dict, BoundaryDictionary)): self.logger.error("Failed. Use `edit_design_settings` function.")