4-4. Saving and reading MUSTIG graphs

4-4-1. Opening a new graph
4-4-2. Saving a graph
4-4-3. Opening a graph
4-4-4. Saving a graph as a library
4-4-5. Load and save options

 

4-4-1. Opening a new graph

The New command in the File menu opens a blank window. Pick up modules from the libraries and slide them into this window to create your application. Remember to save your graph once in a while.

4-4-2. Saving a graph

Any MUSTIG graph can be saved using the Save or Save as… commands in the File menu. When a graph is saved for the first time, a dialog window allows to select the directory and file name of the graph to be saved.

The Alt+S shortcut may be used to quickly save the graph . Be aware that no periodic saving is done by MUSTIG. You should thus use the shortcut once in a while to save your graph.

The Save as… command allows to re-save an existing graph with another file name, in order to make a copy of the original file for example.

Mustig program files are terminated by .MTG and are recognized with a special icon. A .BAK backup file is created each time you resave a graph with the same name. In case you want to restore the old version, just change the .BAK extension into .MTG and load the file normally.

4-4-3. Opening a graph

The Open command in the File menu loads a MUSTIG graph from the disk. A dialog window allows to browse the directories and filesto select the appropriate file.

The name of the last opened files are displayed at the bottom of the File menu : just click on a name to open the file without having to use the Open command.

4-4-4. Saving a graph as a library

The Save special command in the File menu saves a graph as a library. This means that the graph is saved with a non-compacted format : a complete reference table is created.

When you open this graph later on, it is considered as an additional library. Thus, it cannot be modified until you open it with the Open special command in the File menu.

The graphs you will build later on using modules from this new library will be more compact at load time, due to MUSTIG's virtual loading process. The modules in your program will fill up with appropriate code from the new library only as and when required.

You may want to use his command if you have gathered a lot of modules together to make a custom personal library, and wish to use these modules to build new applications.

4-4-5. Load and save options

Several options are proposed in the Edit / Options menu :

Test of identical macros : If this option is checked (default) when you save the graph, all the macros are compared to each other and identical macros are saved only once to save disk space. However, if your MUSTIG program is huge this process may be long and you may want to uncheck this option.

Save whole graph : If this option is checked, the whole graph is saved. This means that the graph can be read and executed even if the libraries used for its construction are not present, which can be useful if you use a French version of MUSTIG and you want to use your program with an English version, or if you use custom libraries. Of course, the size of the obtained files is larger !

If the Save whole graph option is unchecked (default), the libraries used to build your applications must be available at load time. The size of the files is much smaller, as only references to library modules and calling parameters are recorded. If the required libraries are found in the search directories (see Search directories) they are automatically loaded. If some libraries are not found, the associated modules are shown as a multiple selection (see Multiple selection), so that you can address the problems individually.

If you save a graph after having closed the libraries, the graph is saved as if the Save whole graph option has been checked, even if it is not.

If a graph has been recorded with the Save whole graph option checked, the may open it and resave it without this option : the macros are considered again as elements from a required library.