Index: /issm/trunk-jpl/src/m/contrib/defleurian/paraview/exportVTK.py
===================================================================
--- /issm/trunk-jpl/src/m/contrib/defleurian/paraview/exportVTK.py	(revision 26571)
+++ /issm/trunk-jpl/src/m/contrib/defleurian/paraview/exportVTK.py	(revision 26572)
@@ -67,9 +67,12 @@
         for solution in solnames:
             #looking for multiple time steps
-            if (np.size(res_struct.__dict__[solution]) > num_of_timesteps):
-                num_of_timesteps = np.size(res_struct.__dict__[solution])
-                num_of_timesteps = int(num_of_timesteps)
-                if 'Surface' in dict.keys(res_struct.__dict__[solution][0].__dict__):
-                    moving_mesh = True
+            try:
+                if len(res_struct.__dict__[solution]) > num_of_timesteps:
+                    num_of_timesteps = len(res_struct.__dict__[solution])
+                    num_of_timesteps = int(num_of_timesteps)
+                    if 'Surface' in dict.keys(res_struct.__dict__[solution][0].__dict__):
+                        moving_mesh = True
+            except TypeError:
+                continue
     else:
         num_of_timesteps = 1
@@ -92,4 +95,5 @@
         raise BadDimension('exportVTK does not support your element type')
 
+    #only keep the envelope and not the bulk of the results.
     if enveloppe:
         if dim == 3:
@@ -252,28 +256,42 @@
             for sol in solnames:
                 treated_res = []
-    #dealing with results on different timesteps
-                if(np.size(res_struct.__dict__[sol]) > timestep):
-                    timestep = step
-                else:
-                    timestep = np.size(res_struct.__dict__[sol])
-
-    #getting the  fields in the solution
-                if(type(res_struct.__dict__[sol]) == list):
+                #dealing with results on different timesteps
+                try:
+                    if(len(res_struct.__dict__[sol]) > timestep):
+                        timestep = step
+                    else:
+                        timestep = np.size(res_struct.__dict__[sol])
+                except TypeError:
+                    #result as no len() so no timesteps
+                    timestep = 1
+
+                #getting the  fields in the solution
+                if(type(res_struct.__dict__[sol]).__name__ == 'solution'):
                     spe_res_struct = res_struct.__dict__[sol].__getitem__(timestep)
                     fieldnames = dict.keys(spe_res_struct.__dict__)
-                else:
+                elif(type(res_struct.__dict__[sol]).__name__ == 'solutionstep'):
                     spe_res_struct = res_struct.__dict__[sol]
                     fieldnames = dict.keys(spe_res_struct.__dict__)
-
-    #Sorting scalars, vectors and tensors
+                elif(type(res_struct.__dict__[sol]).__name__ == 'results'):  #this is a result without steps
+                    spe_res_struct = res_struct.__dict__[sol]
+                    fieldnames = dict.keys(spe_res_struct.__dict__)
+                else:
+                    print("WARNING, solution type '{}' is not recognise, exported results might be wrong".format(type(res_struct.__dict__[sol])))
+                    spe_res_struct = res_struct.__dict__[sol]
+                    fieldnames = dict.keys(spe_res_struct.__dict__)
+
+                #Sorting scalars, vectors and tensors
                 tensors = [field for field in fieldnames if field[-2:] in ['xx', 'yy', 'xy', 'zz', 'xz', 'yz']]
                 non_tensor = [field for field in fieldnames if field not in tensors]
                 vectors = [field for field in non_tensor if field[-1] in ['x', 'y', 'z'] and field[-4:] not in ['Flux']]
 
-    #check which field is a real result and print
+                #check which field is a real result and print
                 for field in fieldnames:
+                    print("Treating {}".format(field))
                     if field in treated_res:
+                        print("{} is already done".format(field))
                         continue
                     elif field in vectors:
+                        print("{} is a vector".format(field))
                         try:
                             Vxstruct = np.squeeze(spe_res_struct.__dict__[field[:-1] + 'x'])
@@ -299,4 +317,5 @@
 
                     elif field in tensors:
+                        print("{} is a tensor".format(field))
                         try:
                             Txxstruct = np.squeeze(spe_res_struct.__dict__[field[:-2] + 'xx'])
@@ -346,5 +365,4 @@
                         else:
                             print("format for field {}.{} is not suported, field is skipped".format(sol, field))
-                            continue
     # }}}
     # loop on arguments, if something other than result is asked, do it now {{{
