Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Dymola scritping as in OpenModelica

Dymola scritping as in OpenModelica

Hi everyone!

Is there any way to call a function of Dymola from outside, let's say command line, in the same way as we do with OpenModelica?
I am interested in using the dymola compiler and scripting functions without opening the application itself.

Greetings!

Re: Dymola scritping as in OpenModelica

Sort of. You can call:
/opt/dymola/bin/dymola.sh -NoWindow someFile.mos

But you will not get any log-file output unless you call such a function from the script. And unless you call exit(), the process will keep running (and mos-scripts stop running on failure, so just adding an exit() at the end does not help).

I am sure there are some ways that work better. I just don't know them.

Re: Dymola scritping as in OpenModelica

I see...

Thanks a lot. Actually, what I am doing now is take advantage of the dymosim.exe that dymola generates when compiling each model and call this .exe file from outside (using Python). This is another way, but it requires to compile first the model inside dymola.

I will try your suggestion.

Cheers!

There are 0 guests and 0 other users also viewing this topic
You are here: