TCL: how to count the nodes selected?

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Dear members,

I tried to applied force on nodes. The total force is a constant. But the mesh changes every time, so I want get the force applied to every nodes by calculating (total force)/(total number if nodes selected).

Does anyone know how to get the total number of selected nodes by TCL?

I tried hm_count, but I can not find a example of hm_count. As well, I don't know which variable is used to save the number in hm_count. Or hm_count return a value?

Thanks a lot!

Richard

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2011

    Richard

    Once you have your list of nodes selected, a command like hm_marklength can be used to determine the number of items in the selected list.

    Cheers,

    Eric

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2011

    Eric, Thanks!