# Functions in different versions

**URL:** https://discourse.vtk.org/t/functions-in-different-versions/6205
**Category:** Support
**Created:** [July 18, 2021, 12:11pm UTC](https://discourse.vtk.org/t/functions-in-different-versions/6205 "2021-07-18T12:11:16Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![yuantangjin](https://discourse.vtk.org/user_avatar/discourse.vtk.org/yuantangjin/32/3678_2.png) [@yuantangjin](https://discourse.vtk.org/u/yuantangjin)
#### Post date: [July 18, 2021, 12:11pm UTC](https://discourse.vtk.org/t/functions-in-different-versions/6205/1 "2021-07-18T12:11:16Z")

</div>

I found an open source code on GitHub. This code was developed earlier, so he called the method in the “vtkXMLPUnstructuredGridWriter.h” file in the VTK5.0.3 version, but I encountered many problems installing the old version of VTK, so The VTK 8.2.0 version is installed, I would like to ask the function names and usage methods of the following three functions in the new version:  
1、SetInput()  
2、SetTimeStepRange()  
3、SetTimeStep()  
The picture is the problem I encountered, that is, the three function names that need to be updated

 ![微信图片_20210717153355](https://discourse.vtk.org/uploads/default/original/2X/8/8c5324a0f70f8edf4752c8b063083ebb15950bf7.jpeg)

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [July 18, 2021, 12:27pm UTC](https://discourse.vtk.org/t/functions-in-different-versions/6205/2 "2021-07-18T12:27:35Z")

</div>

These are changes to the pipeline execution API which was updated in VTK 6 or 7. Alas, I can’t find the release notes for those versions right now, sorry ☹ .

---

<div class="post-metadata">

### Author: ![yuantangjin](https://discourse.vtk.org/user_avatar/discourse.vtk.org/yuantangjin/32/3678_2.png) [@yuantangjin](https://discourse.vtk.org/u/yuantangjin)
#### Post date: [July 18, 2021, 12:36pm UTC](https://discourse.vtk.org/t/functions-in-different-versions/6205/3 "2021-07-18T12:36:35Z")

</div>

Can you give some instructions on how to install VTK5.0.3 version on Ubuntu 18.04 system? Including the dependencies involved in this version, because I am not very proficient in this area. I have not installed it after a long time of trouble recently. I can’t find the corresponding function in the VTK 8.2.0 version. I plan to install the old version.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [July 18, 2021, 1:32pm UTC](https://discourse.vtk.org/t/functions-in-different-versions/6205/4 "2021-07-18T13:32:48Z")

</div>

I doubt that VTK 5.x is going to compile on a modern compiler (older VTK tried to embed version information into its build and new releases would end up failing the check and therefore the build).

Someone else here may be able to help with the required API updates though.

---

<div class="post-metadata">

### Author: ![yuantangjin](https://discourse.vtk.org/user_avatar/discourse.vtk.org/yuantangjin/32/3678_2.png) [@yuantangjin](https://discourse.vtk.org/u/yuantangjin)
#### Post date: [July 18, 2021, 1:37pm UTC](https://discourse.vtk.org/t/functions-in-different-versions/6205/5 "2021-07-18T13:37:21Z")

</div>

OK，thank you. I’ll wait and see if someone can help me complete required API updates

---

<div class="post-metadata">

### Author: ![yuantangjin](https://discourse.vtk.org/user_avatar/discourse.vtk.org/yuantangjin/32/3678_2.png) [@yuantangjin](https://discourse.vtk.org/u/yuantangjin)
#### Post date: [July 18, 2021, 1:55pm UTC](https://discourse.vtk.org/t/functions-in-different-versions/6205/6 "2021-07-18T13:55:26Z")

</div>

@kitware-sysadmin @kit Can you help me？Thank you very much

---

<div class="post-metadata">

### Author: ![yuantangjin](https://discourse.vtk.org/user_avatar/discourse.vtk.org/yuantangjin/32/3678_2.png) [@yuantangjin](https://discourse.vtk.org/u/yuantangjin)
#### Post date: [July 19, 2021, 4:53am UTC](https://discourse.vtk.org/t/functions-in-different-versions/6205/7 "2021-07-19T04:53:09Z")

</div>

@pranjal.sahu can yo help me about this question? Thank you very much!

---

<div class="post-metadata">

### Author: ![pranjal.sahu](https://discourse.vtk.org/user_avatar/discourse.vtk.org/pranjal.sahu/32/6052_2.png) [@pranjal.sahu](https://discourse.vtk.org/u/pranjal.sahu)
#### Post date: [July 20, 2021, 1:31am UTC](https://discourse.vtk.org/t/functions-in-different-versions/6205/8 "2021-07-20T01:31:19Z")

</div>

Can you please also share the repo link which you are trying to build ?

---

<div class="post-metadata">

### Author: ![yuantangjin](https://discourse.vtk.org/user_avatar/discourse.vtk.org/yuantangjin/32/3678_2.png) [@yuantangjin](https://discourse.vtk.org/u/yuantangjin)
#### Post date: [July 20, 2021, 3:35am UTC](https://discourse.vtk.org/t/functions-in-different-versions/6205/9 "2021-07-20T03:35:58Z")

</div>

[https://gitlab.kitware.com/vtk/vtk/-/tree/v5.0.3](https://gitlab.kitware.com/vtk/vtk/-/tree/v5.0.3)  
I want to install VTK5.0.3 version on Ubuntu 18.04 system, because some functions (which in VTK5.0.3) was called. My ultimate goal is to build the repo as following: [GitHub - martinjrobins/SPH-DEM: An academic c++ code for numerical modelling of fluid-particle systems using Smoothed Particle Hydrodynamics (SPH) and Discrete Element Modeling (DEM)](https://github.com/martinjrobins/SPH-DEM)  
In the code, [GitHub - martinjrobins/SPH-DEM: An academic c++ code for numerical modelling of fluid-particle systems using Smoothed Particle Hydrodynamics (SPH) and Discrete Element Modeling (DEM)](https://github.com/martinjrobins/SPH-DEM), three functions are called in the VTK5.0.3

---

<div class="post-metadata">

### Author: ![pranjal.sahu](https://discourse.vtk.org/user_avatar/discourse.vtk.org/pranjal.sahu/32/6052_2.png) [@pranjal.sahu](https://discourse.vtk.org/u/pranjal.sahu)
#### Post date: [July 21, 2021, 3:41am UTC](https://discourse.vtk.org/t/functions-in-different-versions/6205/10 "2021-07-21T03:41:13Z")

</div>

> [@yuantangjin](#):
>
> vtkXMLPUnstructuredGridWriter

Check this link: [VTK: vtkXMLPUnstructuredGridWriter Class Reference](https://vtk.org/doc/nightly/html/classvtkXMLPUnstructuredGridWriter.html)

I found for SetInput, change it to SetInputData
