The sample script shown below runs an OptiStruct simulation, calls HyperView in batch mode to extract results, and then copies the results. This is a .bat script written for Windows.
|
In the case of nested .bat files, call is required; otherwise, the main script continues without waiting for the completion of the second script.
set HST_ALTAIR_HOME=C:\Altair\hw11.0
REM ## Perform Simulation
call %HST_ALTAIR_HOME%\hwsolvers\bin\win64\optistruct.bat %STUDY_RUN_PATH%\model.fem
REM ## Perform the result extraction
start /wait /min %HST_ALTAIR_HOME%\hw\bin\win64\hw.exe %STUDY_RUN_PATH%\model.h3d %STUDY_RUN_PATH%\model.h3d -tcl %STUDY_DIR_PATH%\export_maxStress_val.tcl -b
REM ## copy the results in the current study folder
copy C:\result.txt %STUDY_RUN_PATH%\result.txt