Salome HOME
Implement view python function to be able to view a field's iteration from the python...
[modules/med.git] / src / MEDCalc / tui / medconsole.py
index 5f2bfbc4bf1ec50f178f31623e125e5ebd464960..7ae45231a35dedf9c663249b084f9265913002fe 100644 (file)
@@ -18,6 +18,7 @@
 #
 
 import medcalc
+import MEDCALC
 
 dataManager = medcalc.medcorba.factory.getDataManager()
 
@@ -159,3 +160,10 @@ def accessField(fieldHandlerId):
   """
   return medcalc.newFieldProxy(fieldHandlerId)
 #
+
+def view(field):
+  """
+  Display the field at its timestep
+  """
+  medcalc.MakeScalarMap(field, viewMode=MEDCALC.VIEW_MODE_REPLACE, scalarBarRange=MEDCALC.SCALAR_BAR_CURRENT_TIMESTEP)
+  pass