Create list of all components with TCL

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

Hello,

 

I need to do a loop on all my components and i don't know how to do it...

Something like that :

 

set list_comp {list 'all' components} #doesn't work...
set m 0

 

foreach i $list_comp {
   incr m
   set cname [hm_entityinfo name components $i]
  #instruction
}

 

If someone can help me..

 

Thanks.

Tagged:

Answers

  • QuyNguyenDai
    QuyNguyenDai Altair Community Member
    edited February 2018

    Try some thing like:

     *createmark comps 1 all set comps_list [hm_getmark comps 1] foreach comp $comp_list {    # do something here    puts 'Comp= $comp' }

     

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited February 2018

    It's working ! Thank you