Updating the iunteractive preview window while moving vertices via MEL

Hi all.
I’m trying to find a command which will update the interactive preview window (perspective view), while a for loop is running in MEL and moving every vertex a little bit. The script finishes everything before it updates the viewport. I want to see every vertex move as it is itterated on, for visual effect, even if it’s too fast to make sense out of.

Any thoughts?

thank you!

Can you use the refresh command for this? It may slow down your script considerably but going from your post thats probably part of the requirement.

http://download.autodesk.com/us/maya/2010help/Commands/refresh.html

Warning, it is going to be very, very, very slow.

Thanks guys.
I used refresh -cv;
I also added a counter which only refreshes the view every n loops, so I can control the “playback speed” so to speak.

Im using the XYShrinkwrap tool and wanted to see it in action. Pretty cool effect!

Thanks again.