Get number of Combination numbers in Solution Combination?

Hello
This is my first post in the community and it could maybe be that my question is not relevant and/or placed in wrong part of the forum, but I’ll give it a try.
I have started with some simple python scripting in Mechanical and written a few lines that create stress results in a Solution Combination. The Solution Combination I use as test case contains 2 different combinations.
For now the number of combinations (=2 in my example) is hard coded.
I would like to extract this number in the script but have not managed to do this...
Any ideas how I can extract this in a simple way?
Best regards,
Erik
Best Answer
-
Hi
These numbers (Combination Number) are user inputs, just as time or step is when we evaluate normal results - so we need to tell at what time or which comb., to evaluate so 1 or 2 in your case (by default it picks Last).
Still as to your question on how to get the Load Combination number , see this post :
https://discuss.ansys.com/discussion/2762/how-to-fill-the-worksheet-for-fatigue-combination
0
Answers
-
did not show all of the "script" in the first post, here it is with path and solu_c rows.
0 -
Yes, _ NumLoadCombos_ did the trick!
It was mentioned in the discussion you linked to that this is undocumented command, outside any QA programs and may not be forward compatible, which doesn't feel completely satisfactory. On the other hand this worked fine at my end with 2023 R1 (have not tested in any other version) and if the command is changed/removed in future version I will probably get some notice/message.
Thank you!
Erik1 -
Yes I just added that last comment ( NumLoadCombos) for you . All the best
0