# Script to automatically export .vrml

**URL:** https://discourse.paraview.org/t/script-to-automatically-export-vrml/5742
**Category:** ParaView Support
**Tags:** python
**Created:** [November 7, 2020, 11:01am UTC](https://discourse.paraview.org/t/script-to-automatically-export-vrml/5742 "2020-11-07T11:01:45Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Rosanna\_Cap](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rosanna_cap/32/5235_2.png) [@Rosanna\_Cap](https://discourse.paraview.org/u/Rosanna_Cap)
#### Post date: [November 7, 2020, 11:01am UTC](https://discourse.paraview.org/t/script-to-automatically-export-vrml/5742/1 "2020-11-07T11:01:45Z")

</div>

Hello everyone,  
I need to export an isosuperface for every time (I have 1000 different time) so I think a Python script to do automatically (I’ve never used python).  
What I do is:

1. I open .xyz file and I load .q files
2. I create a contour with a value range 3,5e-5
3. I choose a time (0 to 1000)
4. Export scene and choose .vrml file type
5. To the end I reneme my new .vrml file with the time choose at the 3 point  
(for exemple: If I have choose 20 seconds, I reneme my .vrml file with 20)

My problem is that I have 1000 seconds and for each of them, I have to export the isosurface in .vrml.  
I know it’s not very complicated, but it’s a very long process.

Please, Can you help me?

---

<div class="post-metadata">

### Author: ![jaswantp](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jaswantp/32/11456_2.png) [@jaswantp](https://discourse.paraview.org/u/jaswantp)
#### Post date: [November 7, 2020, 1:47pm UTC](https://discourse.paraview.org/t/script-to-automatically-export-vrml/5742/2 "2020-11-07T13:47:31Z")

</div>

Trace steps [2,3,4] (`Tools->Start Trace->Ok`). This will output a python script which you could repeat in a for loop or something. You’ll need some level of python expertise from here on. 🙂

Find more info [here](https://kitware.github.io/paraview-docs/latest/python/quick-start.html#creating-a-pipeline). Steps 1, 5 can be done from python itself.

---

<div class="post-metadata">

### Author: ![Rosanna\_Cap](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rosanna_cap/32/5235_2.png) [@Rosanna\_Cap](https://discourse.paraview.org/u/Rosanna_Cap)
#### Post date: [November 8, 2020, 11:04am UTC](https://discourse.paraview.org/t/script-to-automatically-export-vrml/5742/3 "2020-11-08T11:04:35Z")

</div>

Hello,  
Thanks for your answer. I’ve just a doubt: how can i implement the 5th step on a python script inside a for cycle?  
Thanks

---

<div class="post-metadata">

### Author: ![jaswantp](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jaswantp/32/11456_2.png) [@jaswantp](https://discourse.paraview.org/u/jaswantp)
#### Post date: [November 8, 2020, 11:36am UTC](https://discourse.paraview.org/t/script-to-automatically-export-vrml/5742/4 "2020-11-08T11:36:02Z")

</div>

Hmm, the trace might contain a variable for time. Find it and and set file name in the section of code that exports each time step.

You’ll have to edit the trace once it’s generated to suit your needs.

---

<div class="post-metadata">

### Author: ![Rosanna\_Cap](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rosanna_cap/32/5235_2.png) [@Rosanna\_Cap](https://discourse.paraview.org/u/Rosanna_Cap)
#### Post date: [November 8, 2020, 1:55pm UTC](https://discourse.paraview.org/t/script-to-automatically-export-vrml/5742/5 "2020-11-08T13:55:45Z")

</div>

Thank you so much for your help, I did it!
