How to rotate view in HyperMesh using script?

Vladimir_Gantovnik
Vladimir_Gantovnik Altair Community Member
edited January 14 in Community Q&A

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

  • Fred_Juras
    Fred_Juras
    Altair Employee
    Answer ✓

    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.htm

    Then 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 CloseStack

    Regards,
    Fred.

  • Marvin Frank
    Marvin Frank Altair Community Member
    Answer ✓

    Hi @Vladimir_Gantovnik,

    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:

Answers

  • Fred_Juras
    Fred_Juras
    Altair Employee
    Answer ✓

    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.htm

    Then 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 CloseStack

    Regards,
    Fred.

  • Marvin Frank
    Marvin Frank Altair Community Member
    Answer ✓

    Hi @Vladimir_Gantovnik,

    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: