-def run_mascaret():
- try:
- with wait_cursor:
- ed = hydro_study.HydroStudyEditor()
- sobj = ed.editor.study.FindObjectID(salome.sg.getSelected(0))
- (file_list, lig_file, input_vars, output_vars) = ed.get_mascaret_params_from_case(sobj)
- var_names = [var["NOM"].strip() for var in output_vars]
- mascaret_vars = [var["VARIABLE_MASCARET"].strip() for var in output_vars]
- engine = salome.lcc.FindOrLoadComponent("FactoryServer", "MASCARET")
- logger.debug("Calling MASCARET.Compute(%s, %s, %s)" %
- (file_list, lig_file, mascaret_vars))
- output_values = engine.Compute(file_list, lig_file, mascaret_vars)
- ed.add_results_to_mascaret_case(sobj, var_names, output_values)
- salome.sg.updateObjBrowser( 0 )
- except SALOME.SALOME_Exception, exc:
- salome.sg.updateObjBrowser( 0 )
- msg = unicode(QApplication.translate("run_mascaret",
- "An error happened while trying to run Mascaret:"))
- msg += "\n" + exc.details.text
- raise HSGUIException(msg)
+#def run_mascaret():
+ #try:
+ #with wait_cursor:
+ #ed = hydro_study.HydroStudyEditor()
+ #sobj = ed.editor.study.FindObjectID(salome.sg.getSelected(0))
+ #(file_list, lig_file, input_vars, output_vars) = ed.get_mascaret_params_from_case(sobj)
+ #var_names = [var["NOM"].strip() for var in output_vars]
+ #mascaret_vars = [var["VARIABLE_MASCARET"].strip() for var in output_vars]
+ #engine = salome.lcc.FindOrLoadComponent("FactoryServer", "MASCARET")
+ #logger.debug("Calling MASCARET.Compute(%s, %s, %s)" %
+ #(file_list, lig_file, mascaret_vars))
+ #output_values = engine.Compute(file_list, lig_file, mascaret_vars)
+ #ed.add_results_to_mascaret_case(sobj, var_names, output_values)
+ #salome.sg.updateObjBrowser( 0 )
+ #except SALOME.SALOME_Exception, exc:
+ #salome.sg.updateObjBrowser( 0 )
+ #msg = unicode(QApplication.translate("run_mascaret",
+ #"An error happened while trying to run Mascaret:"))
+ #msg += "\n" + exc.details.text
+ #raise HSGUIException(msg)