Skip to content

Commit

Permalink
Fix UDM bug when parameter is passed (#2924)
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuelopez-ansys authored Apr 27, 2023
1 parent c57b881 commit 9ce2853
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion _unittest/test_08_Primitives3D.py
Original file line number Diff line number Diff line change
Expand Up @@ -1145,10 +1145,11 @@ def test_66c_group_components(self):
)

def test_66d_component_bounding_box(self):
self.aedtapp["tau_variable"] = "0.65"
my_udmPairs = []
mypair = ["OuterRadius", "20.2mm"]
my_udmPairs.append(mypair)
mypair = ["Tau", "0.65"]
mypair = ["Tau", "tau_variable"]
my_udmPairs.append(mypair)
mypair = ["Sigma", "0.81"]
my_udmPairs.append(mypair)
Expand Down
4 changes: 4 additions & 0 deletions pyaedt/modeler/cad/Primitives3D.py
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,10 @@ def create_udm(
vArgParamVector.append(
["NAME:UDMParam", "Name:=", name_param, "Value:=", str(val), "PropType2:=", 3, "PropFlag2:=", 4]
)
elif val in self._app.variable_manager.variables:
vArgParamVector.append(
["NAME:UDMParam", "Name:=", name_param, "Value:=", str(val), "PropType2:=", 3, "PropFlag2:=", 2]
)
else:
vArgParamVector.append(
[
Expand Down

0 comments on commit 9ce2853

Please sign in to comment.