#_____________________________________
import sys, os, re,types
+import traceback
from PyQt4.QtGui import QMessageBox
from salome.kernel.logger import Logger
from salome.kernel.studyedit import getStudyEditor
-from salome.geom.structelem import StructuralElementManager, InvalidParameterError
# couleur pour visualisation des geometries
def envoievisu(self,liste_commandes):
- import traceback
+ try:
+ from salome.geom.structelem import StructuralElementManager, InvalidParameterError
+ except ImportError:
+ QMessageBox.critical(self, self.tr("Error"),
+ self.tr("Cannot display structural elements: "
+ "module GEOM is not installed."))
+ return
try:
atLeastOneStudy = self.editor.study
if not atLeastOneStudy:
elem.display()
salome.sg.updateObjBrowser(True)
except InvalidParameterError, err:
- from PyQt4.QtGui import QMessageBox
trStr = self.tr("Invalid parameter for group %(group)s: %(expr)s must be "
"greater than %(minval)g (actual value is %(value)g)")
msg = str(trStr) % {"group": err.groupName, "expr": err.expression,