TAGGED: design-point, input-parameters, spaceclaim, workbench
-
-
January 13, 2023 at 7:49 am
henrique.geraissate
SubscriberHello everyone,
I am trying to perform a parametric study in which each design point will change my geometry dimensions. These parameters that I want to vary were created through the Space Claim ruler dimension feature.
What happens is, whenever I delete a parameter in Space Claim, it is NOT deleted from the parameter list in workbench. Also, if I recreate the parameter in Space Claim with the exact same name, it is duplicated in the Workbench list and I receive the following error when trying to run the simulation:
"System.ArgumentException: An item with the same key has already been added"
I've found a similar post here in the forum, but it is unanswered.
Does anyone knows how could I delete this old parameters from the Workbench list?
Thanks in advance,
Henrique -
January 13, 2023 at 4:03 pm
peteroznewman
SubscriberThis thread has a solution which I copy/pasted into my reply. I have not tried this myself.
I found that if you go to the variable that you are using for the input parameter and then uncheck the "use as input parameter" checkbox, save the project, then go back and check the checkbox and it should clear up the unused parameter.
I also found that in the case where you delete an expression or variable that you used as an input parameter it will not delete it from the Workbench parameters list. To get around this, remake the variable that you deleted, i.e. if you deleted a variable, that we'll call X1, that was an input parameter, remake the variable X1 but this time don't check the "use as input parameter" checkbox, save the project, and it will be deleted from your parameter list in Workbench. Then you can go back and delete the variable again.-
January 13, 2023 at 4:09 pm
henrique.geraissate
SubscriberHello Peter, thanks for your answer.
Unfortunately, I guess that it doesn't applied to my case as in SpaceClaim you don't have this "use as input parameter" check box. It seems that, once you create the parameter in the "groups" tab, you cannot undo that action. I mean, you can delete it or even ctrl+z it, but it will be already transfered to the workbench list, from which you won't be able to remove anymore. I don't know if I am missing something though.
Any other thoughts?
Henrique
-
-
January 13, 2023 at 6:08 pm
Govindan Nagappan
Ansys EmployeeIf you do not see the parameters in Spaceclaim - > groups tab, but shows up in WB parameter set, you can use script to delete the parameter
- In Workbench project page, Go to File -> Scripting -> Open Command Window
- Copy and paste the following commands and hit enter to delete the parameter
Â
p2 = Parameters.GetParameter("P2")
parameterizedEntity = p2.GetAssociatedEntityProperties().keys()[0]
parameterizedProperty = p2.GetAssociatedEntityProperties()[parameterizedEntity][0]
p2.Disassociate(parameterizedEntity, parameterizedProperty)
p2.Delete()
Â
In the commands above, we are deleting parameter named P2.
p2 = Parameters.GetParameter("P2")
You can change the name to delete a different parameter
-
January 16, 2023 at 8:26 am
henrique.geraissate
SubscriberDear Govindan,
That worked just perfectly, thank you very much for sharing those commands!
Kind regards,
Henrique
-
- The topic ‘How to delete parameters created in Space Claim?’ is closed to new replies.
-
3572
-
1188
-
1076
-
1063
-
952
© 2025 Copyright ANSYS, Inc. All rights reserved.