How to export space coordinates and scalar data on a slice?

I recently switched to Paraview 5.4.1 from a commercially available visualization tool. I am able to create the required slices, but when I try exporting/saving the data in CSV, the exported data is not in a format I want or rather all the data is not in one file. Saving data created multiple files with point coordinates, but the scalar data was missing. Exporting field data gives me the scalar data but no space coordinates. How can I export both space coordinates and scalar data from a slice in to a single CSV file?

And if possible can someone explain me as to why multiple CSV files are created?

Welcome to ParaView!

It sounds to me like your data is multiblock, i.e., it has different parts defined as blocks in a multiblock structure. When you export to CSV, one CSV file is created for each block. To produce one CSV, you can use the Merge Blocks filter to create a non-multiblock dataset and save data from that.

Do you have cell-associated or point-associated data in your dataset? If you export cell-associated data, you won’t get x, y, z points because that only make sense to export for point-associated data. Field data is data associated with the dataset but which doesn’t have a one-to-one correspondence with points or cells, so exporting it shouldn’t produce x, y, z points in the CSV.

Maybe you could describe your data a bit more to help diagnose what is happening?

1 Like

Hi Cory Quammen,
Sorry for re-intializing this old topic. Your answer have really helped me. I am also facing a similar issue. Should I first use the “Merge Blocks” option then “slice” the plane and then export to CSV (Merge Blocks–> Slice–> Export) or instead first slice and then “Merge Blocks” (Slice–> Merge Blocks–>Export)?
Paraview also have the option for multiple slicing at a time, so I guess I can use this method for exporting different slices? Thanks again for your post.

Slice -> Merge Blocks should typically be faster. Doing it the other way requires merging the full data set, then taking a slice from the result. Slicing first results in less data to merge, hence it should be faster.

Sure, but keep in mind creating multiple slices will put all the data from different slices into a single CSV file. You could instead use multiple Slice filters to generate different slices and save those out to different files, or use scripting to move a single Slice filter to different positions and save out the data from each slice to individual files.

1 Like

Thanks a lot @cory.quammen for your prompt replying to this old post. I found that results from the process Blocks–> Slice–> Export and Slice–> Merge Blocks–>Export are different. It that usual, meanwhile I will recheck the results.

I am not sure how to save different slices from the Multiple Slice filter. Any comments ?

If by Multiple Slice filter you mean the Slice filter with multiple offsets, then the only way to save individual slices is to apply a series of filters that extract an individual slice - hardly worth it in my opinion. It should be easier to move a single Slice to different locations, or create several Slice filters and save those datasets via File -> Save Data.

1 Like