Run a Script from the TCL window in hypermesh

User: "María Plata"
Altair Community Member
Updated by María Plata

Hi everybody,

I would like to compile my file "cantilever.hm"  to run my simulation and obtain the results from the TCL window, but the commands I found don't work.

Can anybody help me?

Thank you!

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "Adriano_Koga"
    Altair Employee
    Accepted Answer
    Updated by Adriano_Koga

    Thank you for replying!!

    I want to create a database of pictures to train afterwards a neural network. In order to do that, I want to automate the process by using a tcl script that has this main three functions:

    1- Prepare the Hypermesh model with the necessary boundary conditions to be compiled. ✅

    2- Export the .fem model, and run the solver to obtain the results. ❌

    3- Evaluate the results and take a screencapture. ✅

    So far, I have being trying different codes but I cannot find a complete file that works none of them runs the simulation.

    When I manually run the simulation, I cannot obtain, in the file 'comand.txt' ,the necessary code to compile the file. The only part saved in this txt file is the the one related with part 1 and 3.

    *createstringarray 5 "HM_NODEELEMS_SET_COMPRESS_SKIP " "EXPORT_DMIG_LONGFORMAT " \
      "HMMATCOMMENTS_XML" "HMBOMCOMMENTS_XML" "INCLUDE_RELATIVE_PATH "
    *feoutputwithdata "C:/Program Files/Altair/2022.2/hwdesktop/templates/feoutput/optistruct/optistruct" "D:/ADRIANO/export.fem" 0 0 2 1 5

     

    This is the basic command.

    To get this, I've launched my model manually in HyperWorks, and exported the file as a .fem model for OptiStruct.

    Once I did that, I went to the command.tcl file and this was automatically written there.

    Nor to run your model, you need to call:

    exec {install_folder/.....optistruct.bat} "model_folder/export.fem"

    image