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

Loading simultaneously 4 user libraries

Loading simultaneously 4 user libraries

My team is developing 4 libraries simultaneously. When I load them, I click 4 times on "File --> Load Library".
This is of course a bit time-consuming. Does anyone know a way to load these 4 libraries at once ?

Thanks in advance !

Re: Loading simultaneously 4 user libraries

Tools -> Options -> Libraries you can set libraries to launch on startup.
Otherwise you could load a model with uses-annotations on each of the libraries, which would load them all automatically provided they are on the MODELICAPATH or the model is in the same directory as all of the libraries.

Re: Loading simultaneously 4 user libraries

Hi sjoelund,

I am using OMEdit 1.18.
If I add the path to my library in Tools -> Options, it has no effect (even though I restart the computer).

On Linux, if I manually add the path to my library (using export MODELICAPATH), I can load the library using a model annotation. So issue can be circumvented, and success !

On Windows however (which is the system I need to use), I tried :
- adding the library to the folders in the ModelicaPath (no success)
- modifying  the ModelicaPath to point to my library (no success).

The task seemed easy yet it perplexes me.

Thanks for your answer !


Re: Loading simultaneously 4 user libraries

This seems like a bug. Do you by any chance still have OPENMODELICALIBRARY environment variable defined?

Re: Loading simultaneously 4 user libraries

In Windows and Linux :

No, OPENMODELICALIBRARY var is not defined.
However, if I copy the default path indicated in Tools->Options->Libraries->Modelicapath + the path to my libraries folder into a new var named OPENMODELICALIBRARY, it WORKS!  current/big_smile

What I wrote in Linux bashrc :
OPENMODELICALIBRARY=usr/bin/../lib/omlibrary:/home/gerrer/.openmodelica/libraries/:/home/gerrer/library-modelica

What I wrote in Windows system variable pannel :
var name : OPENMODELICALIBRARY
path : C:/Program Files/OpenModelica1.18.0-dev.beta1-64bit/lib/omlibrary;C:/Users/admgerrer/AppData/Roaming/.openmodelica/libraries;C:/Users/admgerrer/Downloads

So, I can go further, thx for your help !

Out of curiosity, what is the name of the default var gathering the path to the libraries ? Is it a system variable ? For I have no sys var named MODELICAPATH on Linux nor Windows.

Re: Loading simultaneously 4 user libraries

It uses OPENMODELICALIBRARY, which by default will be nothing and then we grab libraries from the installation directory + your home directory. In the Modelica specification, MODELICAPATH is used as a concept, but in order to avoid clashes with other tools we don't use that as env.var.

Re: Loading simultaneously 4 user libraries

This is much clearer to me, thanks a lot !

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