How to run hypermesh in batch mode

JoaoGunther
JoaoGunther Altair Community Member

I developed a script to setup a simulation and run it with the python API, but I am struggling to run it in batch mode.

I copied the code from this post but it does not work for me. When I run it in CMD it just doesn't do anything

Here is the code I am using in CMD:

"C:\Arquivos de Programas\Altair\2025\hwdesktop\hwx\bin\win64\runhwx.exe" -cfg -client HyperWorksDesktop -plugin HyperworksPost -profile HyperworksPost -f C:\Users\joaog\Desktop\Udesc\TCC\Codigo Hypermesh deu certo agora vai\Main_Agora_Vai.py -b

Welcome!

It looks like you're new here. Sign in or register to get started.

Best Answer

  • Michael Herve
    Michael Herve
    Altair Employee
    Answer ✓

    Hello again,

    can you please call HyperMesh directly (without the launcher)?


    "C:\WORK\DevBuilds\2025.0.0.24\hwdesktop\hwx\bin\win64\runhwx.exe" -client HyperWorksDesktop -plugin HyperworksGeneral -profile HyperworksGeneral -l en -startwith HyperMesh -f "C:\Temp\batch_args_sysargv.py"

    If this not enough, can you please create a support request with your script so that my colleagues can investigate further?

    Regards,

    Michael

Answers

  • Michael Herve
    Michael Herve
    Altair Employee
  • JoaoGunther
    JoaoGunther Altair Community Member

    Thank you for your response!

    I managed to run it from the CMD with this command:

    "C:\Program Files\Altair\2025\hwdesktop\hwx\bin\win64\runhwx.exe" -client HyperWorksDesktop -plugin HyperworksLauncher -profile HyperworksLauncher -l en -startwith HyperMesh -f "C:\Users\joaog\Desktop\Udesc\TCC\Codigo Hypermesh deu certo agora vai\Main Agora Vai.py"

    But when I add -b to run it in batch mode it still doesn't do anything.

  • Michael Herve
    Michael Herve
    Altair Employee

    Hello @JoaoGunther ,

    in your command line I see your Python file is inb

    C:\Users\joaog\Desktop\Udesc\TCC\Codigo Hypermesh deu certo agora vai\Main Agora Vai.py

    What if you remove all spaces and replace it with underscore instead?

    Regards,

    Michael

  • JoaoGunther
    JoaoGunther Altair Community Member

    I just ran a few tests. Replacing spaces with underscores, with and without -b.

    Without -b it opens hypermesh as usual and runs my code without any issues.

    But with -b in any position in the command line like below it starts hypermesh (I can see it in the task manager) but closes soon after.

    "C:\Program Files\Altair\2025\hwdesktop\hwx\bin\win64\runhwx.exe" -client HyperWorksDesktop -plugin HyperworksLauncher -profile HyperworksLauncher -l en -startwith HyperMesh -b -f "C:\Users\joaog\Desktop\Udesc\TCC\Codigo_Hypermesh_deu_certo_agora_vai\Main_Agora_Vai.py"

  • Michael Herve
    Michael Herve
    Altair Employee
    Answer ✓

    Hello again,

    can you please call HyperMesh directly (without the launcher)?


    "C:\WORK\DevBuilds\2025.0.0.24\hwdesktop\hwx\bin\win64\runhwx.exe" -client HyperWorksDesktop -plugin HyperworksGeneral -profile HyperworksGeneral -l en -startwith HyperMesh -f "C:\Temp\batch_args_sysargv.py"

    If this not enough, can you please create a support request with your script so that my colleagues can investigate further?

    Regards,

    Michael

  • JoaoGunther
    JoaoGunther Altair Community Member

    Thank you for your help, Michael! It is working now

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.