Modelica definition:

Returns a string with the name of the model/block that is simulated, appended with the fully qualified name of the instance in which this function is called.

If MyLib.Vehicle is simulated, the call of getInstanceName() might return: Vehicle.engine.controller

Outside of a model or block, the return value is not specified.

OpenModelica specifics:

When OpenModelica does not have a prefix (e.g. in functions or packages), it returns the name of the function or package.

If no class was being simulated, the last simulated class or a default will be used (applicable for functions called from the scripting environment).


function getInstanceName
  output String instanceName;
end getInstanceName;

Generated at 2024-05-19T18:15:52Z by OpenModelicaOpenModelica 1.22.4 using GenerateDoc.mos