- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » runScript
runScript
runScript
Hello!
I am trying to run a script before starting the simulation, so i used at the beginning of my model
function runScript "Runs the mos-script specified by the filename."
input String filename ;
output String result;
external "builtin" ;
annotation(preferredView = "text");
end runScript;
now my question is: Where do you decline the path of the file i wanna read? or does the OMEdit automatically look in the direction where my main package is saved?
Re: runScript
runScript will not work during simulation runtime. And the time at which it is evaluated during translation is random as well... There is no way to specify in experiment annotation or similar that a script should be run before simulating.
To read files relative to the library, use modelica:// URLs, see https://build.openmodelica.org/Document … ource.html
- sjoelund.se
- 1700 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » runScript