# Creating multiple lines in vtk python

**URL:** https://discourse.vtk.org/t/creating-multiple-lines-in-vtk-python/5644
**Category:** Support
**Created:** [April 27, 2021, 8:46am UTC](https://discourse.vtk.org/t/creating-multiple-lines-in-vtk-python/5644 "2021-04-27T08:46:12Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jamesnoel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/j/8491ac/32.png) [@jamesnoel](https://discourse.vtk.org/u/jamesnoel)
#### Post date: [April 27, 2021, 8:46am UTC](https://discourse.vtk.org/t/creating-multiple-lines-in-vtk-python/5644/1 "2021-04-27T08:46:13Z")

</div>

Hello Everyone,

I am a relatively new user to vtk and I am trying to insert multiple lines into my polyData object to later apply the tubefilter.I have seen suggestions on how to do this in c++ plus not for python. Does anyone have any advice on how to do this?

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [April 28, 2021, 11:47am UTC](https://discourse.vtk.org/t/creating-multiple-lines-in-vtk-python/5644/2 "2021-04-28T11:47:02Z")

</div>

Hello, James,

Please, take a look at this question in Stack Overflow: [python - Creating a closed loop with vtkTubeFilter - Stack Overflow](https://stackoverflow.com/questions/38266711/creating-a-closed-loop-with-vtktubefilter/38512578) . The question has code examples for both creating a polyline and applying the tube filter.

regards,

Paulo
