I am trying to get OMC to simulate my model directly (without an IDE like OMEdit). I have a large about of models so I created a bat script to like the following to do it for me.
However, i have been getting an error of
Error processing file "F:\model_1.mo"
[F:\model_1.mo:4:3-4:89:writable] Error: Class Modelica.SIunits.Voltage not found in scope Model_1.RampVoltage while instantiating SL_RampVoltageX.v.
I think i need to load the Modelica Library first, but I am unsure how as I'll I have found has been a .zip of it.
thanks in advance
You can run the following on Linux (and Windows if you setup paths correctly... which is a pain):
omc +s MyModel.mo Modelica
make -f MyModel.makefile
Or you can run:
Or use plot3 instead of plot as it is nicer
Hey thanks a bunch sjoelund.se
I get a file does not exist error if I try to run from my bat (or from a .mos, loaded into omc).
OM Shell has no problem with the command, everything is installed to the standard location. I'm I doing something wrong?
omc.exe plot(x); //or plot3 as was pointed out =)
Note that this is not the way, the OMC API commands (the text) below, you put them in a file called script.mos
then you use the SHELL script command:
> omc script.mos
to run this sequence of OMC API commands from Modelica script file script.mos.