functionloadString

Loads Modelica definitions from a string.

Information

Parses the data and merges the resulting AST with the loaded AST. If a filename is given, it is used to provide error messages as if the string was read from a file with the same name.

When merge is true the classes cNew in the file will be merged with the already loaded classes cOld in the following way:

  1. get all the inner class definitions from cOld that were loaded from a different file than itself
  2. append all elements from step 1 to class cNew public list

NOTE: Encoding is deprecated as *ALL* strings are now UTF-8 encoded.

Inputs

TypeNameDefaultDescription
Stringdata
Stringfilename"<interactive>"
Stringencoding"UTF-8"Deprecated as *ALL* strings are now UTF-8 encoded
Booleanmergefalseif merge is true the parsed AST is merged with the existing AST, default to false which means that is replaced, not merged
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.

Outputs

TypeNameDefaultDescription
Booleansuccess