functionsaveTotalModel
Information
Save the className model in a single file, together with all the other classes
that it depends upon, directly and indirectly. This file can be later reloaded
with the loadFile()
API function, which loads className and all the other needed
classes into memory.
This is useful to allow third parties to run a certain model (e.g. for debugging) without worrying about all the library dependencies.
The classes it depends upon are found by looking up the names used in
className, in every class declared in it and in what they use, in the
scopes of the new frontend, without instantiating them. className is
saved whole, so for a package all its classes are saved, while of the other classes
only the ones used and of their packages only the constants used are saved. A class
that fails to instantiate is saved with what it refers to, so the saved model fails
the same way. The className_total model extending
className is not added for packages and functions.
Please note that the resulting file is not a valid Modelica .mo file according to the specification and cannot be loaded in OMEdit - it can only be loaded with loadFile() or passing the file to the compiler on the command line.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| String | fileName | ||
| TypeName | className | ||
| Boolean | stripAnnotations | false | |
| Boolean | stripComments | false | |
| Boolean | obfuscate | false |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | success |