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 2023-02-06T01:32:01Z by OpenModelicaOpenModelica 1.21.0~dev-229-g4bf6782 using GenerateDoc.mos