Request for availability of script of extracting Mode Shapes from HyperView in .gif format
I would like to enquire if there is any script available to extract multiple modes shapes (in .gif format) of modal analysis.
Lets say I have to extract first 10 mode shapes from HyperView for my FEA report generation, I am interested in such script to do that. Save all those gifs at any specified folder, so that I can use it.
Find more posts tagged with
MVP Toolbar (available here: https://web2.altairhyperworks.com/hubfs/MVP_Toolbar.zip)
has this for avi, it may be possible to modify the tcl to write gif instead
Attached is modified version of the modal export tool from MVP toolbar, now it writes gifs instead of AVI
You can also use the brand new HWC commands that makes automation in HyperView much easier.
Take a look at the attached video.
The script would be something like this:
#open model
hwc open animation modelandresult /BR_LAP52/ADRIANO/MODELOS_BASICOS/MODAL_CONTATO/Modal_CONTATO.h3d
/BR_LAP52/ADRIANO/MODELOS_BASICOS/MODAL_CONTATO/Modal_CONTATO.h3d
#load result and legend
hwc result scalar load type="Eigen Mode"
hwc show legends
for {set i 1} {$i <= 3} {incr i} {
#contouring mode #i
hwc result simulation $i
#capturing GIF for mode i
hwc save animation page /BR_LAP52/ADRIANO/MODELOS_BASICOS/MODAL_CONTATO/mode_${i}.gif
}
Hey Adriano,
your comments where quite useful. I wonder however, if there is the possibility to to loop through each mode with the suggested for-loop.Something like:
...
for {set i 1} {$i <= 3} {incr i} {
#contouring mode #i
hwc result mode $i
#capturing GIF for mode i
...
The only option I found in the HWC command documentation is the result subcase <id> command. This only recognizes my Subcase 1 (Normal_Modes) and only displays the Mode 1. I can't find a way to acces any other mode via TCL commands e.g. Mode 2, Mode 3 ... .
Does anyone know a solution for that?
Thanks a lot!
Leon
Hey Adriano,
your comments where quite useful. I wonder however, if there is the possibility to to loop through each mode with the suggested for-loop.Something like:
...
for {set i 1} {$i <= 3} {incr i} {
#contouring mode #i
hwc result mode $i
#capturing GIF for mode i...
The only option I found in the HWC command documentation is the result subcase <id> command. This only recognizes my Subcase 1 (Normal_Modes) and only displays the Mode 1. I can't find a way to acces any other mode via TCL commands e.g. Mode 2, Mode 3 ... .
Does anyone know a solution for that?
Thanks a lot!
Leon
in HV, your mode is the 'simulation'.
for {set i 1} {$i <= 3} {incr i} {
#contouring mode #i
hwc result simulation $i
#capturing GIF for mode i
hwc save animation page /BR_LAP52/ADRIANO/MODELOS_BASICOS/MODAL_CONTATO/mode_${i}.gif
}
in HV, your mode is the 'simulation'.
for {set i 1} {$i <= 3} {incr i} {
#contouring mode #i
hwc result simulation $i
#capturing GIF for mode i
hwc save animation page/BR_LAP52/ADRIANO/MODELOS_BASICOS/MODAL_CONTATO/mode_${i}.gif
}
Might it be, that you are working with Hyperworks 2021.2... because when I run the scrip with Hyperworks 2021.1 I get the same gif (of the first mode) exported muliple times as if Hyperworks does not differenciate between Simulation 1 and 2.
Might it be, that you are working with Hyperworks 2021.2... because when I run the scrip with Hyperworks 2021.1 I get the same gif (of the first mode) exported muliple times as if Hyperworks does not differenciate between Simulation 1 and 2.
What solver are you using?
If this is OptiStruct, the behavior should be like mentioned before.
But maybe you're using another solver, so that the result file is written differently.
Just launch HW Console, and perform the same operation manually, changing the mode number from one to another.
This will write the command in the HW Console, and then you can use the same command. (of course, adjusting it to be parametrically changed in your 'for' loop.
What solver are you using?
If this is OptiStruct, the behavior should be like mentioned before.
But maybe you're using another solver, so that the result file is written differently.
Just launch HW Console, and perform the same operation manually, changing the mode number from one to another.
This will write the command in the HW Console, and then you can use the same command. (of course, adjusting it to be parametrically changed in your 'for' loop.
Hi Adriano,
I am also running OptiStruct.
I launched the HW Console, and found, that changing the mode manually leads to the command 'animate frame <id>' in the console. So I get 'animate frame 2' for the second mode and 'animate frame 3' for the third mode.
When I type in this command however, it does what it actually should do and jump to the defined frame in <id>. So I don't know why I get this command written in HW Console when changing the mode.
When I use the command 'result simulation 1' I get an error message about the syntax. (see the image attached)
Thank you very much again.
MVP Toolbar (available here: https://web2.altairhyperworks.com/hubfs/MVP_Toolbar.zip)
has this for avi, it may be possible to modify the tcl to write gif instead
MVP Toolbar (available here: https://web2.altairhyperworks.com/hubfs/MVP_Toolbar.zip)
has this for avi, it may be possible to modify the tcl to write gif instead