.getInstanceName

Information

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).

Interface

function getInstanceName
  output String instanceName;
end getInstanceName;

Generated at 2024-10-14T18:25:21Z by OpenModelicaOpenModelica 1.24.0 using GenerateDoc.mos