🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Create macro for Automesh(F12) with "elem" selection entities

User: "alpha_21885"
Altair Community Member
Updated by alpha_21885

Hi everyone,

 

When I use Automesh(F12) to create FE modeling, I always have to switch b/w Elem and Surf.

I already checked *.cmf command but could not find the default setting for this to make macro.

 

I would like to create 2 shortcutkey: 'E' >> Automesh with element(remesh). 'S' >> Automesh for surface(new mesh).

 

Since I am newbies at TCL, hope any one can help on this TCL macro.

Thanks a lot!

Find more posts tagged with

Sort by:
1 - 8 of 81
    User: "tinh"
    Altair Community Member
    Updated by tinh

    Hello

    as in hm12:

    proc press_E {} {

      hm_setcollector automesh 18 elems

      hm_pushpanel automesh

    }

    proc press_S {} {

      hm_setcollector automesh 18 surfs

      hm_pushpanel automesh

    }

    User: "alpha_21885"
    Altair Community Member
    OP
    Updated by alpha_21885

    Hi Tin. Appreciate your help but your command does not valid on HM12. 'hm_setcollector automesh 18 elems'

    Anyway, it works on Hm11 and I already creates Switch Key b/w Surf/Elems for AutoMesh. No need to 2 shortcut keys!

    User: "Altair Forum User"
    Altair Employee
    Updated by Altair Forum User

    Hi,

     

    at V12 you have to take item 19, e.g. 'hm_setcollector automesh 19 elems', but still a very good hint tinh !

     

     

    Regards,

    Mario

    User: "alpha_21885"
    Altair Community Member
    OP
    Updated by alpha_21885

    Really appreciate Mario for your help. It works with 19 but how do you know this number. If I move to HM13, 14 or HM10, HM9, what is number for this?

    User: "Altair Forum User"
    Altair Employee
    Updated by Altair Forum User

    Hi,

     

    for me it was trial and error, since hm_setcollector is a undocumented feature.

    You can try it very fast inside the tcl command window.

     

    For release V13 it seems to be the same.

     

    Regards,

    Mario

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Heeeee

    The number is sometimes changed a bit although same version. I don't know why

    my hm12 is 18

     

    to get it exactly => you can dump the panel by

    hm_dumppanel automesh

    and looking for the number fore (ENTITY_COLLECTOR)

     

    from hm12, panels seem respond better. with hm11 i usually have to set timer when customize panels

    User: "Altair Forum User"
    Altair Employee
    Updated by Altair Forum User

    thanks for all

    User: "Altair Forum User"
    Altair Employee
    Updated by Altair Forum User

    Hello,

     

    I found code some code like this you can use for any panels selection

     

        hm_pushpanel 'project'

        set id [hm_getcolnumber {project} 1 ]

        hm_setcollector 'project' $id 'comps'

     

    Thanks and Regards

    P.Varthamanan