functionloadFile

Loads a Modelica file (``*.mo``).

Information

Loads the given file using the given encoding.

Note that if the file basename is package.mo and the parent directory is the top-level class, or if the file is a directory, the library structure is loaded as if loadModel(ClassName) was called. Uses-annotations are respected if uses=true. The main difference from loadModel is that loadFile appends this directory to OPENMODELICALIBRARY (MODELICAPATH in the language specification) (for this call only).

Inputs

TypeNameDefaultDescription
StringfileName
Stringencoding"UTF-8"
Booleanusestrue
BooleannotifytrueGive a notification of the libraries and versions that were loaded
BooleanrequireExactVersionfalseIf the version is required to be exact, if there is a uses Modelica(version="3.2"), Modelica 3.2.1 will not match it.
BooleanallowWithintrueWhether to allow the file to have a within-clause other than 'within;'.

Outputs

TypeNameDefaultDescription
Booleansuccess