Skip to content

ModelicaSystem without file input, load from standard library #134

Open

Description

@AnHeuermann

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions