### 7.11 Autosave and Recovery ¶

Since version 5.0 the MFC GUI supports the Restart Manager introduced to Windows in Vista. That is, if Msc-generator crashes (or needs to be stopped due to an installation), its status is saved and is automatically restarted.

The documents you are working on are autosaved.22 Clicking on the ‘`Autosave and Recovery`’ category on the ribbon opens a list of autosaved files on the side.23 Double-clicking a file will recover it either by overwriting the current chart text or by inserting it at the cursor (you can select after double-clicking). You are also offered the option to delete the autosaved file after recovrey. On the ribbon you can filter the list of autosaved file to the current chart type and make Msc-generator to open the list of autosaved files at startup. You can also delete all autosaved files at once.24

Note that in the rare event of an Msc-generator crash25 the restart function kicks in only if the application was open for more than 60 seconds (to prevent restart loops). Your documents are autosaved even before this time, nevertheless.

The CLI GUI has a simple autosave and recovery mechanism. The chart text (and context) is saved rougly every second or if you exit the program without saving your work. When Msc-generator is opened next time, you can recover the last autosave. Note that if you start Msc-generator with a filename, your autosave will be overwritten and lost. Also note that multiple running instances of the CLI GUI perform autosave to the same location overwriting each other constantly.

#### Footnotes

##### (22)

The autosave location is `C:\Users\<username>\AppData\Local`, you can manually recover autosaved files from there.

##### (23)

Any autosaved version of the currently open document is omitted from the list.

##### (24)

If you filter the list of autosaved files to the current chart type then clicking the ‘`Delete autosaved files currently showing`’ button will not delete the autosaved files of other chart types.

##### (25)

The graphviz library crashes on some chart input. This is something I cannot easily fix. Hence the addition of the autosave and recovery functions.