How to generate .fem file from .hm [Optistruct]

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

I am looking to write a windows batch file or linux script that would generate an Optistruct .fem input file given an .hm file.  I looked through the hwsolver/scripts available in Windows versions but it was not obvious as to what to do for this.  Could some help or direction be provided on this?

 

Thank you!

Answers

  • tinh
    tinh Altair Community Member
    edited December 2017

    hi, a sample windows batch file:

    'C:\Program Files\Altair\2017\hm\bin\win64\hmopengl.exe' -batchmesher -noconsole -tcl 'C:\export_to_fem.tcl'

     

    a sample export_to_fem.tcl :

    *readfile 'C:/your_hmfile.hm'

    *feoutputwithdata 'C:/Program Files/Altair/2017/templates/feoutput/optistruct/optistruct' 'C:/your_femfile.fem' 1 0 2 1 1

    exit

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited December 2017

    Thank you for the reply.  I have another question and you must excuse my ignorance.  I am a linux user and I find that you have both forward and backward slashes in your script and command.  Which should I use?  I am using windows 7 (have not used it much) and it has '\' and not '/' in the commandline/dos prompt.  

     

    Thank you.

  • tinh
    tinh Altair Community Member
    edited December 2017

    in batch file it is \

    but in tcl file it is /

     

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited December 2017

    Thank you for the reply.  I have another question and you must excuse my ignorance.  I am a linux user and I find that you have both forward and backward slashes in your script and command.  Which should I use?  I am using windows 7 (have not used it much) and it has '\' and not '/' in the commandline/dos prompt.  

     

    Thank you.

     

    In Linux world, it's so simple: use '/' everywhere :)/emoticons/default_smile.png' srcset='/emoticons/smile@2x.png 2x' title=':)' width='20' />