.OpenModelica.Scripting.addEquation

Adds an equation to a class.

Information

The equation is added to the end of the last equation or initial equation section (depending on
isInitial
) in the class, or to a new section if no suitable section exists. The class must be able to contain equations, i.e. be a normal long class or class extends declaration.

Interface

function addEquation
  input TypeName className "The name of the class to add the equation to";
  input String eq "The equation given as a string";
  input Boolean isInitial = false "Whether the equation should be added as an initial or normal equation";
  output Boolean success "true if the equation could be added, otherwise false";
end addEquation;

Generated at 2026-07-05T18:59:05Z by OpenModelicaOpenModelica 1.27.0 using GenerateDoc.mos