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

Calling openmodelica from C#

Calling openmodelica from C#

Hello,everyone!

   I want to make a GUI in C# which can send parameters to openmodelica and get results from openmodelica.
   Is it possible to do this?
   If possible ,  how should I do ?
   Looking forward to your answer !

Thanks.

Re: Calling openmodelica from C#

Yes, it should be possible to do. Look into the C++ sources on how to start OMC in server mode. Use whatever C# CORBA implementation you fancy and things should work rather smoothly.

Re: Calling openmodelica from C#

In the OpenModelica System Documentation,there are two methods to invoke omc which are Command-line Invokation and Client-Server Architecture.Can I solve the problem by the command-line Invakation?

Re: Calling openmodelica from C#

Client-Server is faster if you need a state in the session. It is also a bit faster since you do not need to load the standard library over and over. Using command-line invocation you can read script results from file, and it should be possible to parse the output.

Re: Calling openmodelica from C#

Thank you for your answer !  It helps me a lot .
Now I can solve the problem by the command-line Invakation.
About the Client-Server , where can I find the C++ sources on how to start OMC in server mode and about the C# CORBA implementation .
Looking forward to your answer !   Thanks.

Re: Calling openmodelica from C#

Thank you for your answer. It helps me a lot.
I am studying on it.
Thanks again.

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