OpenModelica / OMPython

A Python interface to OpenModelica communicating via CORBA or ZeroMQ
Other
107 stars 58 forks source link

ModelicaSystem does not Load Libraries before Model #218

Closed jules-l-jimmy closed 4 months ago

jules-l-jimmy commented 4 months ago

On the latest OMPython, when using ModelicaSystem class with custom packages installed in custom directory and loading a model inside these packages, I have an error due to the fact that ModelicaSystem init loads the file and then the library.

To solve this, I exchanged the loadFile and loadLibrary in the __init__.py file line 862

Now it looks like this

        if fileName is not None:
            self.loadLibrary(verbose)
            self.loadFile(verbose)
arun3688 commented 4 months ago

@jules-l-jimmy can you open a PR with the changes you made

jules-l-jimmy commented 4 months ago

@arun3688 Will you do a release with the fix soon ?

Best