Data in PARAMETRIC component was not read correctly
from the study when the parametric study was run in
batch mode.
from salome.kernel.studyedit import getStudyEditor
from study import ParametricStudy
from salome.kernel.studyedit import getStudyEditor
from study import ParametricStudy
-job_script_template = """
-#!/usr/bin/env python
+job_script_template = """#!/usr/bin/env python
+from salome.kernel.studyedit import getStudyEditor
import PARAMETRIC
salome.salome_init()
import PARAMETRIC
salome.salome_init()
# load study
study = salome.myStudyManager.Open("%(input_study)s")
# load study
study = salome.myStudyManager.Open("%(input_study)s")
-# start container and load PARAMETRIC component
-comp = salome.lcc.FindOrLoadComponent("ParametricContainer", "PARAMETRIC")
+# start container, load PARAMETRIC component and load the content of the parametric study in the component
+ed = getStudyEditor(study._get_StudyId())
+sobj = study.FindObjectID("%(param_entry)s")
+scomp = sobj.GetFatherComponent()
+ed.loadComponentEngine(scomp, "ParametricContainer")
+comp = scomp.GetObject()
# run parametric study
comp.RunStudy(study._get_StudyId(), "%(param_entry)s")
# run parametric study
comp.RunStudy(study._get_StudyId(), "%(param_entry)s")