# How to change the zoom level when running pvbatch script

**URL:** https://discourse.paraview.org/t/how-to-change-the-zoom-level-when-running-pvbatch-script/17577
**Category:** ParaView Support
**Tags:** python
**Created:** [May 22, 2026, 3:10am UTC](https://discourse.paraview.org/t/how-to-change-the-zoom-level-when-running-pvbatch-script/17577 "2026-05-22T03:10:26Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Nikolaos\_Beratlis](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/n/da6949/32.png) [@Nikolaos\_Beratlis](https://discourse.paraview.org/u/Nikolaos_Beratlis)
#### Post date: [May 22, 2026, 3:10am UTC](https://discourse.paraview.org/t/how-to-change-the-zoom-level-when-running-pvbatch-script/17577/1 "2026-05-22T03:10:26Z")

</div>

I have created a Paraview state file .pvsm. When I ran a python script that loads the state file and saves an animation the zoom level is different than then one when I was creating the state file in Paraview. Is it possible to change the zoom level?

```auto
from paraview.simple import *
  
LoadState("Wfield_filaments.pvsm")

renderView1 = GetActiveViewOrCreate('RenderView')
renderView1.ViewSize = [1200, 600]

renderView1.ResetCamera()
renderView1.Update()

SaveAnimation(
    "Wfield_filaments_view01.png"
    , ImageResolution=[1200, 600]
)

```

I tried changing the camera position and focal points but it didn’t seem to change anything.

---

<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: [May 22, 2026, 7:42am UTC](https://discourse.paraview.org/t/how-to-change-the-zoom-level-when-running-pvbatch-script/17577/2 "2026-05-22T07:42:55Z")

</div>

> [@Nikolaos\_Beratlis](#):
>
> `renderView1.ResetCamera()`

This method has a zoomFactor parameter, use it ?

---

<div class="post-metadata">

### Author: ![Nikolaos\_Beratlis](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/n/da6949/32.png) [@Nikolaos\_Beratlis](https://discourse.paraview.org/u/Nikolaos_Beratlis)
#### Post date: [May 22, 2026, 3:41pm UTC](https://discourse.paraview.org/t/how-to-change-the-zoom-level-when-running-pvbatch-script/17577/3 "2026-05-22T15:41:27Z")

</div>

The problem was `renderView1.ResetCamera()`

it was resetting the camera view undoing all the changes.

What is the zoomFactor parameter?
