batch-exporting .gif graphics area video

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Hi,

I want to create hundreds of videos of a modal analysis for different subcases / simulations / views.. I can create those .mvw files easily, so that on each page, I have the animation I want. But in the MVP-Toolbar, all I can do is export 1 screenshot of each page or create an animation of just one page, but I want to create all those videos automatically. Is there a way how to batch-export those .gif, something like

set d 0

foreach page $pages {

*changePage $page

*gifExport C:/data/frame$d.gif

incr d

}

Thanks,

Michael

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2012

    Hi Micheal,

    I have to capture a large number of *.gif images out of my modal solution files.I want to automate the same.

    Can you suggest something for this?

    Thanks in advance.

    regards

    Ramkrishna Shekhar

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2012

    I used a python script to create a mvw-session file with one animation / page, and I think I found something that can export the images:

    hwi GetSessionHandle mySessionName

    mySessionName GetProjectHandle proj

    set numberOfPages [proj GetNumberOfPages]

    for {set i 1} {$i < $numberOfPages +1} {incr i} {

    proj SetActivePage $i

    mySessionName CaptureAnimation gif 'c:/temp/$i.gif'

    }

    I don't know if that is the best solution, but it's working quite nicely for now. Would be better if everything is in tcl, but well.. I don't like tcl..

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2012

    Micheal, this worked!

    Thank you for your Reply.

    =d>