Get number of Combination numbers in Solution Combination?

erik_b
erik_b Member Posts: 6
First Comment
**

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

Answers

  • erik_b
    erik_b Member Posts: 6
    First Comment
    **

    did not show all of the "script" in the first post, here it is with path and solu_c rows.

  • erik_b
    erik_b Member Posts: 6
    First Comment
    **

    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!
    Erik

  • Erik Kostson
    Erik Kostson Member, Moderator, Employee Posts: 287
    50 Answers 100 Comments Second Anniversary 25 Likes
    ✭✭✭✭

    Yes I just added that last comment ( NumLoadCombos) for you . All the best