cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Automating long running animations

PhilipOakley
12-Amethyst

Automating long running animations

I often use animations (essentially a For loop on the built in variable FRAME) to generate multi-pont analyses, including screen snapshots as an AVI..

One issue is that when the analysis takes a very long time, with a need to save the avi at the end, and to take care that data files are not overwritten when the loop finishes (usually with a fresh auto-calc back at FRAME 0).

Has anyone managed to automatically detect the completion of the animation recording, so that the AVI can be saved using some separate piece of automation?

Also has anyone, in a similar manner, managed to automate the backup of data files generated during the animation recording.

Some of my data generations take 5 - 8 hrs and are almost the 1000 FRAME (current) limit, so if anything goes wrong its a whole day wasted.

Philip

5 REPLIES 5

If you're using M15, Philip, could you use a component that takes FRAME as an input and then use a script to save / backup files? Not sure how well it would synchronise, though.

Stuart

Hi Stuart, yes it's V15 M030.

While it's possible to kind of do the auto data backup as you said, the more difficult problem is the saving of the avi, for which the option isn't presented until its all completed. The AVI is all that management want to see sometimes 😉

Philip

Is there any reason why you can't break the run up into, say, batches of 50 or 100 and then merge the avi files into one upon completion?

To prevent overwrite, could you tag each file with the time as well as frame number, or do a file existence check from a component?

Stuart

While it is possible to do it in batches, it still requires me to be physically at the PC to save each avi on completeion, and then extra time to join them together (which I/we don't/didn't have).

If I can automate the detection of the completion of the animation, then it could be possible to then "click" the 'Save' button to capture the avi, and also move/copy the various results files to a safe backup. (Which is especially important in managed IT environments where idle PCs get 'switched off' with consequent data loss; or even just "We have loaded an auto update - you must restart within 1 hr" messages - not a problem in the middle of the night normally but is for an 8hr overnight run 😉

</end weary frustrated rant against 'only here to help' manage IT >

Philip

Hmm. Tricky.

The only thing that pops into my head is to create a boolean that gets set to one after completion of the last FRAME and have a component monitor its value. It then might be possible use the SendKeys method to close the .avi window and then activate the Save As button on the Animation dialog ...

Stuart

PS. This type of scenario is one of the reasons why I have LONG standing feature request to have programmatic animations. The current system is excessively mandraulic; another one of Mathsoft's Good Workaround Quickfix Ideas that gave some facility but should have been dragged screaming and fighting into at least the 19th century in the next iteration!

Announcements

Top Tags