snapshotAsMesh Issue


So i'm writing this script in the form of a modifier. It collects data about my geometry and saves it to a dat file. The only problem is i'm using snapshotAsMesh. Which means that if my geometry changes i have re-run the script manually to capture the changes. what i would like to achieve is a stream of information. i'd like for the dat file to keep updating if my geometry is altered. any ideas?

capture0003.png168.83 KB