Skip to content

How to use ModelicaSystem.convertFmu2Mo() #305

Description

@ondras12345

I haven't found any examples or tests for it.

Do I really have to create a dummy .mo model file, load it and compile it (see ModelicaSystem.__init__()) just to convert a *.fmu to a *.mo?
At first glance, I think this function would be easier to use if it was a @classmethod that constructed a ModelicaSystem from the FMU.

Activity

  1. added this to the 4.0.0 milestone on Jun 17, 2025
  2. arun3688 commented on Jun 17, 2025

    @arun3688
    Collaborator
  3. ondras12345 commented on Jun 17, 2025

    @ondras12345
    ContributorAuthor

    Isn't that the other way around? I see convertMo2Fmu() in the test case, but I was asking about convertFmu2Mo().

  4. syntron commented on Aug 23, 2025

    @syntron
    Contributor

    Here it could help to split ModelicaSystem.__init__() into two parts:

    (1) basic setup of the class and
    (2) definition of all model related options (fileName, modelName, lmodel, variableFilter (?), build)

    Thus, one could run __init__ and after that a new method handling part (2) or convertFmu2Mo() (as method or defined as @classmethod returning a ModelicaSystem on its own; however, in the later case, the options for (1) must be provided)

  5. modified the milestones: 4.0.0, on Sep 19, 2025
  6. adeas31 commented on Dec 2, 2025

    @adeas31
    Member

    @syntron is this already fixed?

  7. modified the milestones: , 5.0.0 on Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions