How to obtain the area of components

pohan
pohan Altair Community Member
edited October 2020 in Community Q&A

Hi

I Hypermesh, I use Tool/Mass calc to calculate the area of some components but I could not find the command for TCL.

Could you please explain me?

Thanks

Tagged:

Answers

  • Imoto
    Imoto
    Altair Employee
    edited June 2018

    Hi

     

    You can use hm_getmass command.

     

    Thanks

  • pohan
    pohan Altair Community Member
    edited June 2018

    Hi

     

    You can use hm_getmass command.

     

    Thanks

    Thank you very much. By the way, do you know how to export this result to excel or text file?

  • Imoto
    Imoto
    Altair Employee
    edited June 2018

    Yes, please try following lines.

     

    set fn [tk_getSaveFile -defaultextension csv];
    set fh [open $fn w];
    puts $fh 'Mass,Volume,Area';
    *createmark elems 1 displayed;
    lassign [hm_getmass elems 1] mass volume area;
    puts $fh '${mass},${volume},${area}';
    close $fh;
     

  • pohan
    pohan Altair Community Member
    edited June 2018

    Thank you.

    I tried this code but the elems could not be selected so I could not get the result. Could you please verify?

    Thanks

  • Imoto
    Imoto
    Altair Employee
    edited June 2018

    Pohan,

    It works fine, please attach your model.

     

    Thanks,

    Imoto