!ANM1 Macro ! PADT's Simple macro for animating whatever plot the user just did ! and saving the frame to PNG's ! Arguments: ! ARG1: Number of frames ! _nmfrm = 5 ! Default frames *if,arg1,ne,0,then _nmfrm = arg1 !Set frames to arg1 *endif ! Get /DSCALE scale factor so we no what to vary over the plots *get,_dmlt,graph,1,dscale,dmult /user,all !Freeze plot settings _dsc=0.0 ! Start scale at 0 ! Calc Scale increment *if,_nmfrm,eq,1,then _ddd=0.0 *else _ddd=1.0/(_nmfrm-1) *endif /cont,1,,user ! Freeze contour /show,png ! Tell ANSYS to save as a PNG file *do,_I,1,_nmfrm !Loop on frames ! Calc displacement scale factor _dsf=_dmlt*_dsc *if,_dsf,eq,0,then !Can't have a zero value, so make it small _dsf=_dmlt*.0000001 *endif /dscal,all,_dsf ! Scale disp /sss,_dsc ! Scale stress || UNDOCUMENTED COMMAND || /repl ! Replot _dsc=_dsc+_ddd ! Incrmnt Scale *enddo ! Close out /show,close ! Don't forget to close that last PNG file /show,term ! Return plotting to the screen /go