Undo, Redo, and Recover
There are three different states to the Undo capability in OpticStudio: None, Memory 1 Step, and Disk Multi Step. The Undo state is set in the Editors section of the OpticStudio Preferences dialog box described in "The Setup Tab".
Undo: None
If the Undo feature state is set to None, then no Undo capability is supported. Use this option on computers which do not have sufficient system memory or disk space to support the Undo feature.
Undo: Memory 1 Step
OpticStudio stores a copy of the current lens in memory before and after every edit or optimization. If Undo is selected, then the current lens is swapped with the previous lens. If Redo is then selected, the lenses are swapped again, which results in the edit being restored.
Memory 1 Step Undo is useful for restoring a lens when an accidental edit is made, or for restoring a lens to the prior state after an optimization. However, only a single Undo step is supported. The advantage of this option is speed; the saving of the prior lens in memory is so fast as to be unnoticeable.
Undo: Disk Multi Step
OpticStudio stores a copy of the current lens in a ZMX file on disk after every edit or optimization. These stored lens files are used to implement an infinite multi-step Undo feature, which allows the reversal of any change or series of changes made to the lens. Undo is useful for restoring a lens when an accidental edit is made, or for restoring a lens to the prior state after an optimization, or even several changes.
To reverse the changes made to a lens, select Undo button from the main OpticStudio toolbar. Any number of Undo's may be executed, back to the first edit made after loading the lens file. The Redo function reverses the last Undo.
OpticStudio maintains a folder of Undo files within the <data>\Undo folder (see "Folders"). The Undo files are automatically deleted whenever the file is saved, a new file is opened, or OpticStudio is normally terminated. If OpticStudio abnormally terminates, the operating system fails, the computer power is disrupted, or for any other reason the lens data is lost, OpticStudio may be able to recover the lost data by restoring the last Undo file. When OpticStudio starts, a check is made to see if any of the Undo files exist. Since these files are deleted during a normal termination, the presence of Undo files indicates a previous abnormal termination. OpticStudio will issue a warning message with the option of restoring the last Undo file. If restored, this file should immediately be saved in a new file name, since the old file name is not stored with the lens.
The Undo feature does slow down the operation of the Editors slightly, since every edit is followed by a save operation. The save does not slow down ray tracing or optimization speed, only lens data editing.
If more than one OpticStudio session is running simultaneously, each session will have its own undo files. However, to recover from a crash or abnormal program termination, the same number of OpticStudio sessions will need to be run to recover all the files. For example, if 2 sessions of OpticStudio are running, and the power fails, the first new session of OpticStudio will be able to recover the former first session file. A second session of OpticStudio will need to be launched to recover the former second session file.
Next: