Is it possible to create HyperMesh model (*.hm) using hmbatch.exe
Guys, is it possible to create HyperMesh model (*.hm) using hmbatch.exe (or something else) without open HyperMesh GUI?
For example, I want to create two nodes and save the model as model.hm using the following tcl script:
*createnode 0 0 0 0 0 0 *createnode 10 0 0 0 0 0 set path_hm "C:/projects/example1/nodes.hm" *writefile $path_hm 1
I don't want the HyperMesh main window to open.
Thank you!
Best Answer
-
Adriano, so what should I do in order create a node in batch mode? Possible? If yes, please, show the example of the batch command.
I can run tcl scripts using this command:
"C:/Program Files/Altair/2021.2/hwdesktop/hm/bin/win64/hmbatch.exe" -tcl "D:/projects/example1/my_script.tcl"
But if I add any commands from HyperMesh API it will not work, because as you said they are not supported by hmbatch. What should we do?
Just did this, by running this command line:
"C:\Program Files\Altair\2022.2\hwdesktop\hm\bin\win64\hmbatch.exe" -tcl "C:\_RUNNING\COMMUNITY\SCRIPT_HMBATCH\myscript.tcl"
Using the attached script, with some tiny modifications.
1
Answers
-
yes, this is possible. The steps are exactly what you have mentioned.
The only thing to worry is that a couple commands (iinterface commands) are not supported by hmbatch.
0 -
Adriano A. Koga_21884 said:
yes, this is possible. The steps are exactly what you have mentioned.
The only thing to worry is that a couple commands (iinterface commands) are not supported by hmbatch.
Adriano, so what should I do in order create a node in batch mode? Possible? If yes, please, show the example of the batch command.
I can run tcl scripts using this command:
"C:/Program Files/Altair/2021.2/hwdesktop/hm/bin/win64/hmbatch.exe" -tcl "D:/projects/example1/my_script.tcl"
But if I add any commands from HyperMesh API it will not work, because as you said they are not supported by hmbatch. What should we do?
0 -
Adriano, so what should I do in order create a node in batch mode? Possible? If yes, please, show the example of the batch command.
I can run tcl scripts using this command:
"C:/Program Files/Altair/2021.2/hwdesktop/hm/bin/win64/hmbatch.exe" -tcl "D:/projects/example1/my_script.tcl"
But if I add any commands from HyperMesh API it will not work, because as you said they are not supported by hmbatch. What should we do?
Just did this, by running this command line:
"C:\Program Files\Altair\2022.2\hwdesktop\hm\bin\win64\hmbatch.exe" -tcl "C:\_RUNNING\COMMUNITY\SCRIPT_HMBATCH\myscript.tcl"
Using the attached script, with some tiny modifications.
1 -
Adriano A. Koga_21884 said:
Just did this, by running this command line:
"C:\Program Files\Altair\2022.2\hwdesktop\hm\bin\win64\hmbatch.exe" -tcl "C:\_RUNNING\COMMUNITY\SCRIPT_HMBATCH\myscript.tcl"
Using the attached script, with some tiny modifications.
Interesting!.... Does it generate correct hm file? Because this message "HM exiting with code 1" is better to be "HM exiting with code 0". I will try now.
0 -
Adriano A. Koga_21884 said:
Just did this, by running this command line:
"C:\Program Files\Altair\2022.2\hwdesktop\hm\bin\win64\hmbatch.exe" -tcl "C:\_RUNNING\COMMUNITY\SCRIPT_HMBATCH\myscript.tcl"
Using the attached script, with some tiny modifications.
Wow, it works. I got two nodes without GUI. This gives me incredible opportunities... Level "God"!
0