Macro for saving Animation as series of jpg

Hi..I am looking for a macro that can create animation of 3D model then save this animation as series of jpg with a different background/scenes using photoview window in solid works.

thanks

SolidworksApi/macros