Script to ceate element sets from components

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

Hello,

 

Is there any script to create element sets by selecting components? 

The hm file I am working has more than 100 components so I was trying to automate the process and create a script, but so far I have not been successful.
Can anyone help me?

Thanks.

 

N.

Tagged:

Answers

  • tinh
    tinh Altair Community Member
    edited March 2018

    Hi,

    example script

    *createmarkpanel comps 1 'Select comps'

    foreach CompID [hm_getmark comps 1] {

         *createmark elems 1 'by comp id' $CompID

         *entitysetcreate SET_ELEMS_$CompID elems 1

    }

    *clearmark comps 1

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited March 2018

    Thanks tinh

    It was exactly what I was trying to do.

    Regards,

    N.