.OpenModelica.Scripting.loadFile

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, 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 the MODELICAPATH (for this call only).

Interface

function loadFile
  input String fileName;
  input String encoding = "UTF-8";
  input Boolean uses = true;
  input Boolean notify = true "Give a notification of the libraries and versions that were loaded";
  input Boolean requireExactVersion = false "If the version is required to be exact, if there is a uses Modelica(version=\"3.2\"), Modelica 3.2.1 will not match it.";
  input Boolean allowWithin = true "Whether to allow the file to have a within-clause other than 'within;'.";
  output Boolean success;
end loadFile;

Generated at 2025-05-08T18:20:46Z by OpenModelicaOpenModelica 1.25.0 using GenerateDoc.mos