Search code examples
modelicadymolaopenmodelica

Dymola - Is there any difference between "Open" and "Load" files?


I’ve been using Dymola (version 2017) for three months and I’d just like to ask a simple issue that I think about it nearly every day. Is there any difference between the file tool “Open” and “Load"? I'm used to use Load for “load” the library packages and Open for “open” the model files, but I've tried to switch them few times and I didn’t notice any difference. I guess that it isn’t relevant and actually it’s just out of curiosity, but maybe someone in this community is able to shed some light on why there are two buttons. Thanks in advance.


Solution

  • Both load your .mo files into the package browser. But Open changes the working directory to the location of the .mo file, whereas Load does not.

    From the command line:

    openModel("lib.mo", changeDirectory=false) // corresponds to load
    openModel("lib.mo")                        // corresponds to open
    

    You can check your current working directory by typing cd on the command line.