# Extract data from plane as a CSV file

**URL:** https://discourse.paraview.org/t/extract-data-from-plane-as-a-csv-file/7548
**Category:** ParaView Support
**Tags:** vtk
**Created:** [July 5, 2021, 8:50am UTC](https://discourse.paraview.org/t/extract-data-from-plane-as-a-csv-file/7548 "2021-07-05T08:50:47Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![R\_Surya\_Narayan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/r_surya_narayan/32/5613_2.png) [@R\_Surya\_Narayan](https://discourse.paraview.org/u/R_Surya_Narayan)
#### Post date: [July 5, 2021, 8:50am UTC](https://discourse.paraview.org/t/extract-data-from-plane-as-a-csv-file/7548/1 "2021-07-05T08:50:47Z")

</div>

Hello everyone,

I have a 3D time varying CFD dataset as binary files. I am able to visualize them in Paraview. However, I would like to know if there is a way to write data as a CSV/DAT file from a sliced plane.I have tried fiddling around with the options in Data Analysis tab but I only find plot over line. Any help on writing binary files to CSV/DAT?

Thanks

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [July 5, 2021, 8:54am UTC](https://discourse.paraview.org/t/extract-data-from-plane-as-a-csv-file/7548/2 "2021-07-05T08:54:40Z")

</div>

File → SaveData → Select .csv ?

---

<div class="post-metadata">

### Author: ![R\_Surya\_Narayan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/r_surya_narayan/32/5613_2.png) [@R\_Surya\_Narayan](https://discourse.paraview.org/u/R_Surya_Narayan)
#### Post date: [July 5, 2021, 9:32am UTC](https://discourse.paraview.org/t/extract-data-from-plane-as-a-csv-file/7548/3 "2021-07-05T09:32:09Z")

</div>

Thanks for your reply,

Does that save the entire data that I loaded into or just the plane?

---

<div class="post-metadata">

### Author: ![R\_Surya\_Narayan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/r_surya_narayan/32/5613_2.png) [@R\_Surya\_Narayan](https://discourse.paraview.org/u/R_Surya_Narayan)
#### Post date: [July 5, 2021, 9:35am UTC](https://discourse.paraview.org/t/extract-data-from-plane-as-a-csv-file/7548/4 "2021-07-05T09:35:06Z")

</div>

Also I don’t have the x, y, z data written this way

Can I define a custom variable to do this? Cuz the data I load doesn’t have the space coordinates

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [July 5, 2021, 9:39am UTC](https://discourse.paraview.org/t/extract-data-from-plane-as-a-csv-file/7548/5 "2021-07-05T09:39:07Z")

</div>

I have no idea what you mean, please explain.

---

<div class="post-metadata">

### Author: ![R\_Surya\_Narayan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/r_surya_narayan/32/5613_2.png) [@R\_Surya\_Narayan](https://discourse.paraview.org/u/R_Surya_Narayan)
#### Post date: [July 5, 2021, 9:49am UTC](https://discourse.paraview.org/t/extract-data-from-plane-as-a-csv-file/7548/6 "2021-07-05T09:49:37Z")

</div>

Sorry for being unclear.

I am doing a 3d CFD simulation which has many variables like x-velocity, y-velocity, z velocity, temperature, etc.

When I do save data, I have a CSV that stores all these variables. But, in addition, I also need the location where these variables are stored i.e. the physical coordinates of the point to which each CSV line corresponds.

Here’s what I mean:

The CSV that I get:

Temp, X\_vel, Y\_Vel, Z\_vel  
900, 20, 20, 30  
…

1000, 25, 25, 25

What I want:

X, Y, Z, Temp, X\_vel, Y\_Vel, Z\_vel

0, 0, 0, 900, 20, 20, 30  
…  
1, 1, 1, 1000, 25, 25, 25

note that the data I load into paraview doesn’t have the space coordinates (X,Y, Z)

I hope this gets the point accross.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [July 5, 2021, 9:51am UTC](https://discourse.paraview.org/t/extract-data-from-plane-as-a-csv-file/7548/7 "2021-07-05T09:51:04Z")

</div>

Add a calculator filter with the following formula:

“coords”

---

<div class="post-metadata">

### Author: ![R\_Surya\_Narayan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/r_surya_narayan/32/5613_2.png) [@R\_Surya\_Narayan](https://discourse.paraview.org/u/R_Surya_Narayan)
#### Post date: [July 5, 2021, 9:56am UTC](https://discourse.paraview.org/t/extract-data-from-plane-as-a-csv-file/7548/8 "2021-07-05T09:56:16Z")

</div>

![image](https://discourse.paraview.org/uploads/default/original/2X/6/6d0273158199293c824434c4e50794af4e30f2df.jpeg)  
You mean that place?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [July 5, 2021, 9:58am UTC](https://discourse.paraview.org/t/extract-data-from-plane-as-a-csv-file/7548/9 "2021-07-05T09:58:12Z")

</div>

Yes, that is the idea, however it looks like you are using “CellData”, so that would not work.

---

<div class="post-metadata">

### Author: ![R\_Surya\_Narayan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/r_surya_narayan/32/5613_2.png) [@R\_Surya\_Narayan](https://discourse.paraview.org/u/R_Surya_Narayan)
#### Post date: [July 5, 2021, 9:59am UTC](https://discourse.paraview.org/t/extract-data-from-plane-as-a-csv-file/7548/10 "2021-07-05T09:59:05Z")

</div>

Any work arounds?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [July 5, 2021, 10:01am UTC](https://discourse.paraview.org/t/extract-data-from-plane-as-a-csv-file/7548/11 "2021-07-05T10:01:24Z")

</div>

I’m still confused on what you are doing, please share your data.

---

<div class="post-metadata">

### Author: ![R\_Surya\_Narayan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/r_surya_narayan/32/5613_2.png) [@R\_Surya\_Narayan](https://discourse.paraview.org/u/R_Surya_Narayan)
#### Post date: [July 5, 2021, 10:04am UTC](https://discourse.paraview.org/t/extract-data-from-plane-as-a-csv-file/7548/12 "2021-07-05T10:04:08Z")

</div>

We changed from Cell data to Point data and it worked, but the other variables vanished.

Will just try something more and let you know what worked

Thanks !

---

<div class="post-metadata">

### Author: ![R\_Surya\_Narayan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/r_surya_narayan/32/5613_2.png) [@R\_Surya\_Narayan](https://discourse.paraview.org/u/R_Surya_Narayan)
#### Post date: [July 5, 2021, 10:26am UTC](https://discourse.paraview.org/t/extract-data-from-plane-as-a-csv-file/7548/13 "2021-07-05T10:26:47Z")

</div>

So I somehow go the coordinates but they are in a separate CSV.

I feel this arises because the other scalars are stored as cell-data and the coordinates we compute as point data

here’s the dataset

> **[plt.tar.gz](https://drive.google.com/file/d/1g0-wXYVdTN2XUJh18QFsVLJK4dGeK-1C/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [July 5, 2021, 1:08pm UTC](https://discourse.paraview.org/t/extract-data-from-plane-as-a-csv-file/7548/14 "2021-07-05T13:08:10Z")

</div>

> [@R\_Surya\_Narayan](#):
>
> I feel this arises because the other scalars are stored as cell-data and the coordinates we compute as point data

This is correct. You can use CellDataToPointData filter to point your data on the points instead.

---

<div class="post-metadata">

### Author: ![R\_Surya\_Narayan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/r_surya_narayan/32/5613_2.png) [@R\_Surya\_Narayan](https://discourse.paraview.org/u/R_Surya_Narayan)
#### Post date: [July 5, 2021, 1:12pm UTC](https://discourse.paraview.org/t/extract-data-from-plane-as-a-csv-file/7548/15 "2021-07-05T13:12:59Z")

</div>

This worked finally
