ANSYS Workbench crashes when running Python Code Object
Hello I'm running one DOE and mechanical has one Python code object, while individually running inside mechanical has no problem but when I press update all design points,ANSYS Workbench crashes.
Error - (DP 2) Update of the Model component in Static Structural for Design Point 2 failed: Conversion Failed. Either the application crashed or Workbench lost communication with it.
Comments
-
Have you made sure that the Python Code object is always connected ? From WB schematic, go to Tools / Options / Mechanical and select this option:
Please also make sure that within Mechanical the workflow works with the Python Code and the value from DP2.
0 -
Hi @Pernelle Marone-Hitz,
Thanks for your reply.
Yes my Python Code object is always connected, option is already ticked.
And I have checked, it is working for all DPs within Mechanical the workflow.Problem is once I click on update project option on workbench project page, it gives error saying mechanical has crashed.
I have one doubt,
I'm trying to use result-->probe option via Python code object, is it really possible to use probing in Python Code or not?0 -
Hi @SK, which version of WB are you using? There has been a lot of improvements in 24R1 in terms or robustness behavior for these objects so I would recomment trying with this latest version.
However, indeed, adding a probe is most certainly tied to the UI and not something that will work in batch mode or in a DOE as the Mechanical interface does not open.
Easiest way to check this is to verify whether your code works without these couple of lines.
There probably are some other ways of retrieving the result that you want though (.PlotData, GetResultsData(), DPF, ...)0 -
Hi @Pernelle Marone-Hitz
Thanks for your reply.
Yes I tried with latest ANSYS version but same error.
May be as you said it is to with UI open/closed case I guess.Can you please help me with a code which writes results data along with its coordinates in a file, run over DOE where we can specify the number of coordinate locations upfront.
0 -
To get access to the result data without having to use a probe, there are a couple of options : PlotData, GetResultsData(), and DPF. You'll find examples on all these solutions in the forum.
0