Skip to content

Commit 6a5b45a

Browse files
committed
Fixed bug in set_variable.
1 parent 2619a7c commit 6a5b45a

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

pyaedt/application/Variables.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
import os
1919
import re
20-
import warnings
2120

2221
from pyaedt import pyaedt_function_handler
2322
from pyaedt.generic.constants import _resolve_unit_system
@@ -767,7 +766,7 @@ def set_variable(
767766
Whether to define a postprocessing variable.
768767
The default is ``False``, in which case the variable is not used in postprocessing.
769768
circuit_parameter : bool, optional
770-
Deprecated. Whether to define a parameter in a circuit design or a local parameter.
769+
Whether to define a parameter in a circuit design or a local parameter.
771770
The default is ``True``, in which case a circuit variable is created as a parameter default.
772771
Returns
773772
-------
@@ -805,11 +804,6 @@ def set_variable(
805804
>>> aedtapp.variable_manager.set_variable["$p1"] == "30mm"
806805
807806
"""
808-
if not circuit_parameter:
809-
warnings.warn(
810-
"`circuit_parameter` argument is deprecated. Use `$` in variable name instead.", DeprecationWarning
811-
)
812-
813807
if not description:
814808
description = ""
815809

@@ -820,9 +814,14 @@ def set_variable(
820814
else:
821815
tab_name = "LocalVariableTab"
822816
prop_server = "LocalVariables"
823-
if self._app.design_type in ["HFSS 3D Layout Design", "Circuit Design"]:
817+
if circuit_parameter and self._app.design_type in [
818+
"HFSS 3D Layout Design",
819+
"Circuit Design",
820+
"Maxwell Circuit",
821+
"Twin Builder",
822+
]:
824823
tab_name = "DefinitionParameterTab"
825-
if self._app.design_type in ["HFSS 3D Layout Design", "Circuit Design", "Maxwell Circuit"]:
824+
if self._app.design_type in ["HFSS 3D Layout Design", "Circuit Design", "Maxwell Circuit", "Twin Builder"]:
826825
prop_server = "Instance:{}".format(desktop_object.GetName())
827826

828827
prop_type = "VariableProp"

0 commit comments

Comments
 (0)