HyperView Batch Mode
Hello everyone,
I would like to launch HyperView in batch mode but I don't find what I want in the help pages.
I'm looking for options in order to launch HyperView specifying the template file and the result file to launch and also run a TCL script.
Maybe someone know how to do that or tell me where to find the awnsers ...
Thanks a lot,
Find more posts tagged with
Hi nhykola,
you find some advises in the manual of HW.
Otherwise here is some short example - the comments are unfortunately in german.
The Example opens a h3d file and create a derived load case with the first three eigenvalues of a buckling analysis. After that the script export the contour of the defomed model into a stl File.
set BatchOrdnerPfad $::env(BatchOrdnerPfad)
set Geometrie $::env(Geometrie)
#set BatchOrdnerPfad 'C:\\Simulation\\AutoTool'
#set Geometrie 'H_20-l_10-psi_90-T_0-eta_240-rho_72111111'
hwi GetSessionHandle Session1
Session1 GetProjectHandle Project1
Project1 GetPageHandle Page1 1
Page1 GetWindowHandle Win1 1
Win1 GetClientHandle Client1
# Model wird geladen
Client1 AddModel '$BatchOrdnerPfad/$Geometrie/Beulen/$Geometrie.h3d'
Client1 GetModelHandle Model1 1
# Ergebnisse (LoadCases) zum Model werden geladen
Model1 SetResult '$BatchOrdnerPfad/$Geometrie/Beulen/$Geometrie.h3d'
Model1 GetResultCtrlHandle Result1
Result1 GetScaleCtrlHandle Scale1
# Scale Faktor des gesamten Models. Jeweils in die drei Achsrichtungen
# !!! SKALIERUNG MUSS ALS ERSTES VORGENOMMEN WERDEN, DA ANDERNFALLS FEHLER AUFTRETEN !!!
Scale1 SetScale '0.1 0.1 0.1'
Scale1 ReleaseHandle
# Neuer (Derived-) Subcase wird eingefügt
Result1 AddSubcase 'BeulMod'
Result1 GetSubcaseHandle Sub1 3
# SubCase Typ = Lineare Superposition
Sub1 SetDerivedType 'superposition'
#Anzahl der Beulmoden, welche Superponiert werden 0,1,2 (3 Stück)
Sub1 AppendSimulation 2 0
Sub1 AppendSimulation 2 1
Sub1 AppendSimulation 2 2
# Skalierungsfaktor der jeweiligen Simulation (hier alle einfach)
Sub1 SetSimulationScaleFactor 0 1
Sub1 SetSimulationScaleFactor 1 1
Sub1 SetSimulationScaleFactor 2 1
Sub1 ReleaseHandle
Result1 SetCurrentSubcase '3'
Model1 SetMeshMode meshlines
# Export der Contour in eine stl-Datei
Result1 GetIsoValueCtrlHandle IsoValue1
IsoValue1 ExportSTL '$BatchOrdnerPfad/Geometrien/$Geometrie.stl'
IsoValue1 ReleaseHandle
# Freigabe aller Handler
Result1 ReleaseHandle
Model1 ReleaseHandle
Client1 ReleaseHandle
Win1 ReleaseHandle
Page1 ReleaseHandle
Project1 ReleaseHandle
Session1 ReleaseHandle
# Befehl um das Skript im Batch Modus auszuführen!
# 'C:\Program Files\Altair\13.0\hw\bin\win64\hw.exe' /clientconfig hwpost.dat -b -tcl C:\Simulation\AutoTool\Python\Hv2stl.tcl
Hi there,
thanks for that script.
Unfortunately I cannot see how to add a second result file. I want to create an envelope loadstep of all topology optimization load steps. These are saved into separate files. (s1,s2,...)
There is the option in hyperview to add a second result file to generate a derived loadstep. But I cannot find any in the help (e.g. append Simulations only allows ids, not paths to files).
Any ideas?
Thanks in advance and best regards,
Merula
You can run tcl script in batch mode, and then evertyhing can be done using tcl scripting
Regards
Maciek