You are here

Working with files : Model file format



Model file format

Version 5.0 saves models as 'packages' by default. This was an optional feature in version 4.0 onwards, but had problems because any automatic save of a model would not include the extras that made it a package. This made it easy for the execution parameters and other package information to get lost. With Simile 5.0 and up, if you do not want a model to start running wen you open it, you must close the execution window before saving it.

Version 3.0 uses a new file format for the express purpose of making it quicker and simpler to move large models between multiple computers. In the past, the *.sml (or *.sim) file contained the Prolog-format model declarations. This file contains the minimum required to display, edit and run the model. In order to speed things up however, a number of other files were also created. These include the canvas file (*.cnv ), which contains drawing instructions and the compiled model (*.dll or *.tcl) in C++ or Tcl code. These files were stored in several different locations, including temporary folders and the "sim_bits" folder.

This caused a certain amount of confusion. In particular moving a model from one computer to another, or even from one folder to another, required Simile to re-build its supporting files. This can be a lengthy process.

In v3.0, the *.sml file now contains all the supporting information as well. Although this means it is larger than before, it is not much larger than the total size of all the files it is replacing.

One final point is also important. In order to preserve the benefit of having a plain-text representation of the declarative model, the file format is a simple multi-part MIME that bundles together all these files. This is exactly the format used when sending an email containing attached files. There are many tools available for manipulating multi-part MIME files. For example, to use Outlook Express, simply change the *.sml extension to *.eml

In summary, when you move a model file to a new location it will:

  • draw quickly when it is first loaded; and
  • build instantly, if it has not changed since it was last built.

To save a model in the old pre-3.0 format, export "Model declarations" as described in the following section.

In: Contents >> Working with files