[Workbench] Access WB-parameter from ICEM replay script.
I am trying to use parameters specified in Design Modeller in an ICEM .rpl-script.
It is probably easier with an example: In DM, i have defined My.width. This shows up in WB, and modifying it from WB correctly updates the geometry. In ICEM's message window, I have tried typing: Code:
set myParam [ic_wb2_get_parameter user_defined My.width] I then created a parameter (calles "test") from within ICEM (settings>Workbench). Now I could get that with Code:
set myParam [ic_wb2_get_parameter user_defined test] This way, I could assign "P1" to "test" in the parameter expression window in WB. This does work - but is clunky in that it requires 3 operations (create param, create param, couple params) in 3 different programs - that adds up if there are many parameters. So the question is: How can I access "My.width" directly from ICEM? |
Hi Adam,
I would probably steer away from using a variable name with a full stop in it. You can try wrapping the variable name in curly brackets as in the following code: Code:
set myParam [ic_wb2_get_parameter user_defined {My.width}] |
Thanks for the suggestion, Stuart, but that's not it.
I tried renaming to "width", I also tried creating a parameter "test2" directly in WB. I was able to acces neither from ICEM. All I got was: Code:
Result: ___NA___ |
Hi Adam,
Parametrization in DesignModeler (Parameter Manager) or Workbench (Parameter Set or Microsoft Excel parameter sheet) is pretty clunky as you already experienced. If you can build your geometry in Icem, then you can write an Icem script and parameterize everything in there. Everything will be at the same place (parameters, geometry and meshing) and easy quick to modify. It takes a little time to get used to the Icem script commands, the TCL language and the poor Icem programmer's guide, but once you have mastered the basics you will never go back to Workbench!! |
Thanks François; I just might go that route.
|
Hi Adam
Did you finally resolve the problem. I have the same problem and I would appreciate if you share your solution. thnks |
All times are GMT -4. The time now is 00:32. |