OpenModelica / OMPython

A Python interface to OpenModelica communicating via CORBA or ZeroMQ
Other
98 stars 56 forks source link

ModelicaSystem does not Load Libraries before Model #218

Open jules-l-jimmy opened 5 days ago

jules-l-jimmy commented 5 days 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 days ago

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

jules-l-jimmy commented 2 hours ago

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

Best