🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

How to execute a python script in batch mode for HyperView?

User: "Akash Purushothaman"
Altair Community Member
Updated by Akash Purushothaman

I have a small script to fetch contour data in HyperView using python APIs. 
I would like to execute this script in batch mode.

Q1. In classic versions, we used to use "\<INSTALL_DIR>\hwdesktop\hw\bin\win64\hw.exe" -b -tcl
Similarly how to execute a python script in batch mode inside HyperView?

Q2. Since 2023 version does not have classic HyperView/HyperMesh anymore.
How to call HM or HV using batch commands? When I use the same command as above, I get the following error
image

This error does not occur when I open the GUI from the start menu.. But when I try to open it from batch window, I get this error.

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "Michal Stefuca"
    Altair Employee
    Accepted Answer

    Hi Akash,

    With the new interface, you can call the runhwx.exe executable in batch (-b option) together with a Python script (-f option followed by the Python file path). I have also attached a small script you can use for testing (it produces a text file in the same location as the script resides).

    "C:\Program Files\Altair\2024.1\hwdesktop\hwx\bin\win64\runhwx.exe" -cfg -client HyperWorksDesktop -plugin HyperworksPost -profile HyperworksPost -f C:\Temp\batch_test.py -b

    image.png

    Thanks,

    Michal Stefuca (Altair)
    Automation & Customization