Paraview macro not exporting all data.

Hi everyone.

I am trying to create a macro A that opens two .pvd files and applies several actions to them, resulting in three torques: Mx, My and Mz. The actions to create the torques are already saved in macro B, which I execute after starting the trace and importing both files.

After obtaining Mx, My and Mz while recording, I export all data to a .csv.

When running the saved macro A with PV python, the saved .csv file does not contain said Mx, My and Mz data points, whereas the .csv file contains all the data when recording the macro. What could cause this? In the macro, the SaveData command clearly states Mx, My and Mz should be saved:

SaveData('/path/to/results.csv', proxy=calculator1_2, PointDataArrays=['Mx', 'My', 'Mz', 'f_2[1]', 'f_2[2]', 'f_2[3]', 'f_2[4]', 'f_2[5]', 'f_2[6]', 'f_2[7]', 'f_2[8]', 'f_2[9]', 'id'])

Yet, only the f_2[x] data and the id shows up.

Any held would be greatly appreciated!

Entire macro can be found attached.
postprocess.py (12.1 KB)

I have found a fix for the issue: It seems using a Macro while tracing is on breaks the trace. I instead edited the pre-existing macro to add the functions needed and it now works properly!

Learning: Create clean sheet macros from start to finish instead of activating macros while tracing your actions :smiley: