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.
getInstanceName()
If this function is not called inside a model or block (e.g., the function is called in a function or in a constant of a package), the return value is not specified.
package MyLib
model Vehicle
Engine engine;
...
end Vehicle;
model Engine
Controller controller;
...
end Engine;
model Controller
equation
Modelica.Utilities.Streams.print("Info from: " + getInstanceName());
end Controller;
end MyLib;
If MyLib.Vehicle is simulated, the call of getInstanceName()
returns Vehicle.engine.controller.