<div dir="ltr"><div>Hi,</div><div><br></div><div>Thanks for your reply. Below is my script:</div><div><br></div><div><br></div><div>&#39;&#39;&#39;</div><div>Created on 29 Oct 2013</div><div><br></div><div>@author: Junyi Han</div>
<div>&#39;&#39;&#39;</div><div>from paraview.simple import *</div><div><br></div><div>PVServer = &#39;localhost&#39;</div><div>OutPutLocation = &#39;/home/johnny/Application/DPD/myDPD-PVersion/&#39;</div><div>exist = 0</div>
<div>count = 0</div><div>true = 1</div><div><br></div><div>Connect(PVServer)</div><div><br></div><div>while true == 1:</div><div>    OutPutFile = OutPutLocation+&#39;local_&#39;+str(count).zfill(4)+&#39;.vtk&#39;</div><div>
    </div><div>    while exist == 0:</div><div>        try:</div><div>            with open(OutPutFile):</div><div>                exist = 1</div><div>        except IOError:</div><div>            exist = 0</div><div>    exist = 0</div>
<div>        </div><div>    reader = OpenDataFile(OutPutFile)</div><div><br></div><div>    reader.PointData</div><div>    view = GetRenderView()</div><div><br></div><div>    dp = GetDisplayProperties()</div><div>    dp.Representation = &#39;Surface&#39;</div>
<div><br></div><div>    readerRep = GetRepresentation()</div><div>    readerRep.ColorArrayName = &#39;density_01&#39;</div><div><br></div><div># Force read</div><div>    reader.UpdatePipeline()</div><div><br></div><div>    Show(reader)</div>
<div>    Render()</div><div><br></div><div># Get a nice view angle</div><div>    if count == 0:</div><div>        cam = GetActiveCamera()</div><div>        cam.Elevation(30)</div><div>        cam.Azimuth(30)</div><div>        Render()</div>
<div>        </div><div>    count = count + 1</div><div># Stop the script killing itself</div><div>    nOutPutFile = OutPutLocation+&#39;local_&#39;+str(count).zfill(4)+&#39;.vtk&#39;</div><div>    while exist == 0:</div>
<div>        try:</div><div>            with open(nOutPutFile):</div><div>                exist = 1</div><div>        except IOError:</div><div>            exist = 0</div><div><br></div></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">2013/11/8 Burlen Loring <span dir="ltr">&lt;<a href="mailto:bloring@lbl.gov" target="_blank">bloring@lbl.gov</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div>it sounds like what happens when one
      leaks datasets, filters, or other vtk objects that hold large
      amounts of data. Could you share your script?  <br><div><div class="h5">
      <br>
      <br>
      On 11/08/2013 09:55 AM, Junyi Han wrote:<br>
    </div></div></div>
    <blockquote type="cite"><div><div class="h5">
      <div dir="ltr">Hi,
        <div><br>
        </div>
        <div>I&#39;m using python script to read data files. Render()
          function is called as many times as the number of files. I
          found that after I call render() for 40 or 50 times, the speed
          of rendering is very slow. Is there a way to solve it? Instead
          of calling Render() function several times, is there a way to
          update or re-render?</div>
        <div><br>
        </div>
        <div>Best wishes,</div>
        <div>Junyi Han</div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a>

Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a>

Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a>

Follow this link to subscribe/unsubscribe:
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a>
</pre>
    </blockquote>
    <br>
  </div>

</blockquote></div><br></div>