Has this ever happened to you?
It’s happened to me several times. There was also that one time I worked on a model for hours, and left it for the night. Can you guess which operating system decided to update and restart overnight without warning? It was like a punch to the gut when I realized I lost all that work.
Fortunately, there’s a really easy way to retrieve all that work.
First, don’t panic. In the model folder there are two vitally important files.
The file session-log.xml is a record of every action you’ve taken while framework is open. Every object you move, every expression you write, every property you change, session-log is watching.
The next time you open Framework Manager, session-log.xml will be renamed session-log-backup.xml, overwriting the old one, and a new blank session-log.xml will be created. Copy that file! If it disappears because FM screws up renaming it, or if you have a brain fart and open the model twice, you’re stuck.
Now that we have a backup of all the work we’ve done, and forgot to save, we can start the reconstruction. Open the Project menu and select “Run Script”
When you press the run button, Framework will perform every action in the list. It pauses on error, allowing you to check what’s going on before proceeding.
Once the script has run it’s course, you can accept the changes, or revert back to the way it was.
And there we go. Hours of worked gone and back again.
One last note, it may be worth enabling the auto save from the Project->Options menu item. It makes the entire premise of this article superfluous.