# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2011-2016 EDF R&D
+# Copyright (C) 2011-2019 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
from omniORB import CORBA
import SMESH
from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(salome.myStudy)
+smesh = smeshBuilder.New()
import MESHJOB
gui_states = ["CAN_SELECT", "CAN_COMPUTE", "CAN_REFRESH", "CAN_PUBLISH"]
def setupJobManager(self):
'''
- This function configures the jobmanager by transmiting the
+ This function configures the jobmanager by transmitting the
parameters required for a local execution and a remote
execution. The choice between "local" and "remote" is done at
- the initialize step, by specifing the name of the resource to
+ the initialize step, by specifying the name of the resource to
be used.
'''
# We first
name. This returns the filename.
'''
filename=str("/tmp/padder_inputfile_"+meshName+".med")
- meshObject.ExportToMEDX( filename, 0, SMESH.MED_V2_2, 1, 1 )
+ meshObject.ExportMED(filename, False, True, True)
return filename
def clear(self):
medfilename = os.path.join(meshJobResults.results_dirname,
meshJobResults.outputmesh_filename)
- smesh.SetCurrentStudy(studyedit.getActiveStudy())
+ smesh.UpdateStudy()
([outputMesh], status) = smesh.CreateMeshesFromMED(medfilename)
# By convention, the name of the output mesh in the study is
meshname = 'padder_'+str(self.__jobid)
smesh.SetName(outputMesh.GetMesh(), meshname)
if salome.sg.hasDesktop():
- salome.sg.updateObjBrowser(False)
+ salome.sg.updateObjBrowser()
self.__ui.lblStatusBar.setText("Publication OK")
self.__setGuiState(["CAN_SELECT"])