How to rotate view in HyperMesh using script?

Hi guys! In HyperMesh tcl I use command
*rotate 0.0 15.0
to rotate model in HyperMesh. Which command should I use to do the same in HyperView? We have "view orientation" but how to rotate to user-defined view?
Thank you!
Best Answers
-
Hi,
For this purpose, you can use the GetViewControlHandle on the window handle:
https://help.altair.com/hwdesktop/hwd/topics/chapter_heads/poi3dviewctrl_class_r.htmThen you should be able to either rotate about an axis [RotateX RotateY RotateZ] or about the screen axis [RotateUp RotateDown RotateLeft RotateRight]
For instance, try:
hwi OpenStack
hwi GetSessionHandle rotate_sess
rotate_sess GetProjectHandle rotate_proj
rotate_proj GetPageHandle rotate_page [rotate_proj GetActivePage]
rotate_page GetWindowHandle rotate_win [rotate_page GetActiveWindow]
rotate_win GetViewControlHandle rotate_view
rotate_view RotateX 30
rotate_view RotateLeft 5
rotate_win Draw
hwi CloseStackRegards,
Fred.1 -
in case you want to create automated FEA reports, you could also try to use Synera. It is a low-code software to automate HyperMesh or OptiStruct e.g. for the creation of FEA report incl. e.g. automated view angle selection for hotspot screenshots.
The software is part of the Altair Partner Alliance, so you can easily download it and give it a try: https://altair.com/synera
Here you can find some examples and see how it works:
1
Answers
-
Hi,
For this purpose, you can use the GetViewControlHandle on the window handle:
https://help.altair.com/hwdesktop/hwd/topics/chapter_heads/poi3dviewctrl_class_r.htmThen you should be able to either rotate about an axis [RotateX RotateY RotateZ] or about the screen axis [RotateUp RotateDown RotateLeft RotateRight]
For instance, try:
hwi OpenStack
hwi GetSessionHandle rotate_sess
rotate_sess GetProjectHandle rotate_proj
rotate_proj GetPageHandle rotate_page [rotate_proj GetActivePage]
rotate_page GetWindowHandle rotate_win [rotate_page GetActiveWindow]
rotate_win GetViewControlHandle rotate_view
rotate_view RotateX 30
rotate_view RotateLeft 5
rotate_win Draw
hwi CloseStackRegards,
Fred.1 -
in case you want to create automated FEA reports, you could also try to use Synera. It is a low-code software to automate HyperMesh or OptiStruct e.g. for the creation of FEA report incl. e.g. automated view angle selection for hotspot screenshots.
The software is part of the Altair Partner Alliance, so you can easily download it and give it a try: https://altair.com/synera
Here you can find some examples and see how it works:
1