Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModelicaSystem without file input, load from standard library #134

Open
AnHeuermann opened this issue Jan 11, 2021 · 0 comments
Open

ModelicaSystem without file input, load from standard library #134

AnHeuermann opened this issue Jan 11, 2021 · 0 comments

Comments

@AnHeuermann
Copy link
Member

I would like to have a way to load a model from MSL or an other library in your Modelica library path with ModelicaSystem.
Apparently some new users are struggling with this, see this question on StackOverflow.

The only solution I could found to load an example from MSL was to search for the path of my MSL libnrary and use

mod = ModelicaSystem('/path/to/lib/omlibrary/Modelica 3.2.3/package.mo', 'Modelica.Electrical.Machines.Examples.AsynchronousInductionMachines.AIMC_Inverter')

If I called omc.sendExpression('loadModel(Modelica, {"3.2.3"})') or omc.sendExpression('loadFile("/path/to/lib/omlibrary/Modelica 3.2.3/package.mo")') before I would like to just use:

mod = ModelicaSystem('Modelica.Electrical.Machines.Examples.AsynchronousInductionMachines.AIMC_Inverter')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant