🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Capture and save animations, window by window, in hyperview using .tcl script

User: "zeta1234"
Altair Community Member
Updated by zeta1234

Hello everyone

> Motive is to capture animations window by window using .tcl script.

              As an example, Lets say there are 6 windows in one page. I have created a script that is able to capture still images window by window and save them. In the same manner I want to capture                  animations. I am unable to find any command that can capture an animation by selecting a current window.

> Supplying a script below. This script capture all the windows in one go and make a single .gif consisting of 6 windows. 

 

 

 hwi OpenStack  hwi GetSessionHandle session session GetProjectHandle project project GetPageHandle page [project GetActivePage ] set i 0 set j 1 while { $i < [expr [page GetNumberOfWindows ]] } { page SetActiveWindow $j page GetWindowHandle window$j [page GetActiveWindow ] if { [expr [window$j IsEmpty ] ] } { puts 'hey hey hey!! window$j is Empty' window$j ReleaseHandle } else { window$j GetClientHandle client client GetModelHandle model 1 model GetResultCtrlHandle result result GetContourCtrlHandle contour set tag [contour GetDataType] set session_name [session GetSessionFileName] # This is the line of capturing an animation. session CaptureAnimation gif $session_name.$tag-$j.gif result ReleaseHandle contour ReleaseHandle model ReleaseHandle client ReleaseHandle window$j ReleaseHandle } #puts ' i is $i ' #puts ' j is $j ' incr i incr j if { $i > [expr [page GetNumberOfWindows ]-1] } { set i 0 set j 1 break } } page ReleaseHandle project ReleaseHandle session ReleaseHandle hwi ReleaseAllHandles hwi CloseStack  

> There is final option of capturing animations by area, but i don't want to use it. It is because the area of windows in page is going to change with requirements.

 

Thanks for going through such a long post :)/emoticons/default_smile.png' srcset='/emoticons/smile@2x.png 2x' title=':)' width='20' />

Would be helpful if i get an answer...

Thanks again

Find more posts tagged with

Sort by:
1 - 2 of 21