Batch mode between Matlab and Hypermesh

Please tell me a step-wise process of how to create batch mode between Matlab and Hypermesh. If possible with codes in it?

3 件のコメント

Eric Trudel
Eric Trudel 2022 年 3 月 25 日
Hello,
Are you trying to run hypermesh in batch mode using Matlab?
You can try this (the full path for hmbatch.exe and the tcl script is required):
system("'/hm/bin/win64/hmbatch.exe' -tcl 'script.tcl'")
But I have never used batch mode before.
Adeline War
Adeline War 2022 年 4 月 8 日
Hi Eric, what if my solver is optistruct. Can I use the same line?
Adeline War
Adeline War 2022 年 4 月 11 日
@Eric Trudel By script, do you mean the command.tcl file generated after creation of model?

サインインしてコメントする。

回答 (1 件)

Dinesh
Dinesh 2023 年 12 月 29 日

0 投票

Hi Adeline,
To create a batch mode interaction between MATLAB and HyperMesh, you can use MATLAB's system commands to call Hypermesh scripts. Start by writing a HyperMesh script (.tcl or .hm script) for the operations you need. Then, from MATLAB, use the "system" command to execute HyperMesh with the script as an argument. Ensure that both MATLAB and HyperMesh are properly installed and configured to run from the command line.
The following is the command that you can use in your MATLAB command line:
system('hypermesh -tcl yourscript.tcl')
The following is an example of a tcl script that you would write:
# Start Hypermesh in batch
# Load a model file
*openmodel "path/to/your/model.hm"
# Execute any operations of your choice here
# Save model here
*feoutput "OptiStruct" "path/to/your/output/file.fem" 0 0 1 1

カテゴリ

ヘルプ センター および File ExchangeInstall Products についてさらに検索

質問済み:

2022 年 3 月 9 日

回答済み:

2023 年 12 月 29 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by