How to refresh mesh with python?

Hi guys,

I am trying to fetch some keypoints at each time frame for level sequence.
I’ve figure out how to set the level sequence to specific time, but when I use get_socket_location() to get the keypoints position, it’ll stay at the previous state.
I guess it’s because i did not refresh the mesh in my Python code, but i don’t know how to do it, anyone can help me ?

Thanks