# How to output the vtk DataFile Version 3.0

**URL:** https://discourse.vtk.org/t/how-to-output-the-vtk-datafile-version-3-0/6354
**Category:** Support
**Tags:** file-formats
**Created:** [August 11, 2021, 9:33am UTC](https://discourse.vtk.org/t/how-to-output-the-vtk-datafile-version-3-0/6354 "2021-08-11T09:33:39Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![kingui1106](https://discourse.vtk.org/user_avatar/discourse.vtk.org/kingui1106/32/3780_2.png) [@kingui1106](https://discourse.vtk.org/u/kingui1106)
#### Post date: [August 11, 2021, 9:33am UTC](https://discourse.vtk.org/t/how-to-output-the-vtk-datafile-version-3-0/6354/1 "2021-08-11T09:33:39Z")

</div>

I am use the vtk 9.0.1.  
I use vtkDataSetWriter to out put vtk file.And i get the # vtk DataFile Version 5.1.  
Is any way to output vtk DataFile Version 3.0.  
Thanks!!!  
···  
vtkNew writer;  
writer-\>SetFileName(filename);  
writer-\>SetInputData(polydata);  
writer-\>Update();  
···

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [August 11, 2021, 9:41am UTC](https://discourse.vtk.org/t/how-to-output-the-vtk-datafile-version-3-0/6354/2 "2021-08-11T09:41:51Z")

</div>

@will.schroeder ?

---

<div class="post-metadata">

### Author: ![will.schroeder](https://discourse.vtk.org/user_avatar/discourse.vtk.org/will.schroeder/32/233_2.png) [@will.schroeder](https://discourse.vtk.org/u/will.schroeder)
#### Post date: [August 11, 2021, 10:46am UTC](https://discourse.vtk.org/t/how-to-output-the-vtk-datafile-version-3-0/6354/3 "2021-08-11T10:46:25Z")

</div>

That could be added to the writer, but currently the functionality does not exist. Right now SetFileVersion(VTK\_LEGACY\_READER\_VERSION\_4\_2) is the oldest supported. You might try the 4.2 version, I don’t think the format changed much between 3.0 and 4.2, although we’d have to deep dive to understand exactly what changed.

---

<div class="post-metadata">

### Author: ![kingui1106](https://discourse.vtk.org/user_avatar/discourse.vtk.org/kingui1106/32/3780_2.png) [@kingui1106](https://discourse.vtk.org/u/kingui1106)
#### Post date: [August 12, 2021, 1:22am UTC](https://discourse.vtk.org/t/how-to-output-the-vtk-datafile-version-3-0/6354/4 "2021-08-12T01:22:04Z")

</div>

Thanks!!But I can’t find SetFileVersion() in the vtk version 9.0.1 and 9.0.3

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [August 12, 2021, 8:09am UTC](https://discourse.vtk.org/t/how-to-output-the-vtk-datafile-version-3-0/6354/5 "2021-08-12T08:09:06Z")

</div>

This is present in master, not in any release yet.

---

<div class="post-metadata">

### Author: ![kingui1106](https://discourse.vtk.org/user_avatar/discourse.vtk.org/kingui1106/32/3780_2.png) [@kingui1106](https://discourse.vtk.org/u/kingui1106)
#### Post date: [August 18, 2021, 3:16am UTC](https://discourse.vtk.org/t/how-to-output-the-vtk-datafile-version-3-0/6354/6 "2021-08-18T03:16:23Z")

</div>

Thanks！！
