Salome HOME
0020623: EDF 1209 SMESH: Load script/execfile add the objects in the wrong study
[modules/smesh.git] / src / SMESH_SWIG / batchmode_smesh.py
index 0ff1560a683bd75f24327709b74e754dd5790364..04091bdc61d21d916b6350cda5c37c43cff47557 100644 (file)
@@ -1,4 +1,3 @@
-#! /usr/bin/python
 #  -*- coding: iso-8859-1 -*-
 #  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
 #
@@ -34,6 +33,7 @@ import SMESH
 modulecatalog = naming_service.Resolve("/Kernel/ModulCatalog")
 
 smesh = lcc.FindOrLoadComponent("FactoryServer", "SMESH")
+smesh.SetCurrentStudy(myStudy)
 myStudyBuilder = myStudy.NewBuilder()
 
 if myStudyBuilder is None: