ModTest Manual v2.15 - 1.5.  Saving and restoring the configuration

Download manual: PDF HTML

1.5.  Saving and restoring the configuration

ModTest's configuration can be saved to a disk file by selecting the FileSave Configuration menu item. This displays a dialog that enables you to enter or select the name of the file to save the configuration to. All of ModTest's configuration (including command definitions) is saved to the file in an XML format.

To restore the configuration from a file, use the FileLoad Configuration menu item. This displays a dialog that enables you to enter or select the name of the file to restore the configuration from. If ModTest is "running" (i.e. the Run button is depressed), you will have to click the Run button before you can load the configuration.

Loading the configuration will add new command definitions and replace existing command definitions, but will not delete any command definitions. If you want to totally replace the the set of register definitions you should delete all the command definitions (using the Delete All button in the Command Table page) before loading the new configuration.

You can also load the configuration from a file when you start ModTest, by passing the name of the file as a command-line argument, e.g.:

java -jar modtest2.15.jar config.xml

If you pass a folder/directory name on the command line instead of a file name, it will be used to set the current directory of the Load Configuration dialog.

There is, currently, no formal DTD (Document Type Definition) or XML schema for the format of the XML files in which the configuration is saved. However, the format should be fairly evident to a human reader, and can easily be edited, if necessary, using a text editor.