-# Copyright (C) 2015-2016 CEA/DEN, EDF R&D
+# Copyright (C) 2015-2019 CEA/DEN, EDF R&D
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# containerType = Name of the container factory
#
-componentName = "MEDFactory"
-corbaModule = "MEDCALC"
+factoryComponentName = "MEDFactory"
+medComponentName = "FIELDS"
+#corbaModule = "MEDCALC"
containerType = "FactoryServer"
import salome
if salome.lcc is None:
salome.salome_init()
pass
-__import__(corbaModule)
-factory = salome.lcc.FindOrLoadComponent(containerType,componentName)
-# The factory is not the main CORBA component of the SALOME module MED
-# (i.e. the engine associated to the active study), but the CORBA
+
+import MEDCALC # corbaModule
+med_engine = salome.lcc.FindOrLoadComponent(containerType,medComponentName)
+factory = salome.lcc.FindOrLoadComponent(containerType,factoryComponentName)
+# The factory is not the main CORBA component of the SALOME module FIELDS
+# (i.e. the engine associated to the study), but the CORBA
# entry point for MED fields operations (i.e. a CORBA component
-# reachable throught the LifeCycleCORBA). This entry point is used to
+# reachable through the LifeCycleCORBA). This entry point is used to
# get the other SALOME CORBA components required for MED field
# operations, in particular the dataManager and the calculator