You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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)
Activity
arun3688 commentedon Jun 17, 2025
@ondras12345 here is a test case which does that https://github.com/OpenModelica/OMPython/blob/master/tests/test_FMIExport.py
ondras12345 commentedon Jun 17, 2025
Isn't that the other way around? I see
convertMo2Fmu()in the test case, but I was asking aboutconvertFmu2Mo().syntron commentedon Aug 23, 2025
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) orconvertFmu2Mo()(as method or defined as@classmethodreturning aModelicaSystemon its own; however, in the later case, the options for (1) must be provided)adeas31 commentedon Dec 2, 2025
@syntron is this already fixed?