I think you need to replace &quot;del writer&quot; with &quot;Delete(writer)&quot;.<br><br>ParaView has a proxy manager that keeps all proxies.  Proxies will not be deleted when the python reference is deleted, you must explicitly call paraview.simple.Delete().  The return value of CreateWriter is a proxy, so it must be Delete()&#39;d.<br>

<br>+1 for Dave&#39;s suggestion, build the pipeline and writer before the loop.<br><br>Pat<br><br><div class="gmail_quote">On Thu, Dec 20, 2012 at 7:43 AM, Andy Bauer <span dir="ltr">&lt;<a href="mailto:andy.bauer@kitware.com" target="_blank">andy.bauer@kitware.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I believe the filter won&#39;t get deleted until after the proxy goes out of scope. If I&#39;m right, you need to call Delete() on it and then have the variable that&#39;s holding the proxy either go out of scope or set to something else.<span class="HOEnZb"><font color="#888888"><br>


<br>Andy</font></span><div class="HOEnZb"><div class="h5"><br><br><div class="gmail_quote">On Wed, Dec 19, 2012 at 4:36 PM, David E DeMarle <span dir="ltr">&lt;<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Not sure why it isn&#39;t garbage collecting for you, but you might try<br>
moving the entire pipeline setup out of the loop and then inside the<br>
loop just call the two set filenames to modify the existing pipeline<br>
before calling Write().<br>
<br>
David E DeMarle<br>
Kitware, Inc.<br>
R&amp;D Engineer<br>
21 Corporate Drive<br>
Clifton Park, NY 12065-8662<br>
Phone: <a href="tel:518-881-4909" value="+15188814909" target="_blank">518-881-4909</a><br>
<br>
<br>
On Wed, Dec 19, 2012 at 4:25 PM, Sebastian &lt;<a href="mailto:sebastiansturm@web.de" target="_blank">sebastiansturm@web.de</a>&gt; wrote:<br>
&gt; Hello Karl,<br>
&gt;<br>
&gt; thank you for your message. I am using Paraview 3.14.1 (64bit).<br>
&gt;<br>
&gt; This is what my script looks like:<br>
&gt;<br>
&gt; # SETTINGS<br>
&gt; directory_pvtu    = &#39;/scratch/mesh3mm_SEM/&#39;<br>
&gt; directory_csv     = &#39;/scratch/mesh3mm_SEM/Z085_velocity_data/&#39;<br>
&gt; file_number_start = 373527<br>
&gt; file_number_end   = 640332<br>
&gt; file_interval     = 693<br>
&gt; file_name_pvtu    = &#39;mesh3mm_SEM###file_number###.pvtu&#39;<br>
&gt; file_name_csv     = &#39;mesh3mm_SEM###file_number###.csv&#39;<br>
&gt;<br>
&gt; print &#39;Script started!&#39;<br>
&gt;<br>
&gt; try: paraview.simple<br>
&gt; except: from paraview.simple import *<br>
&gt;<br>
&gt; while file_number_start &lt;= file_number_end :<br>
&gt;<br>
&gt;   current_file_name_pvtu = file_name_pvtu.replace(&#39;###file_number###&#39;,<br>
&gt; str(file_number_start))<br>
&gt;   current_file = XMLPartitionedUnstructuredGridReader( FileName=[directory_pvtu<br>
&gt; + current_file_name_pvtu] )<br>
&gt;<br>
&gt;   current_file.PointArrayStatus = [&#39;Velocity&#39;]<br>
&gt;<br>
&gt;   SetActiveSource(current_file)<br>
&gt;<br>
&gt;   Slice1 = Slice( SliceType = &#39;Plane&#39; )<br>
&gt;   Slice1.SliceOffsetValues = [0.0]<br>
&gt;   Slice1.SliceType.Origin = [0.0, 0.0, 0.136711]<br>
&gt;   Slice1.SliceType.Normal = [0.0, 0.0, 1.0]<br>
&gt;<br>
&gt;   SetActiveSource(Slice1)<br>
&gt;<br>
&gt;   Slice2 = Slice( SliceType = &#39;Plane&#39; )<br>
&gt;   Slice2.SliceOffsetValues = [0.0]<br>
&gt;   Slice2.SliceType.Origin = [0.0, 0.227757, 0.0]<br>
&gt;   Slice2.SliceType.Normal = [0.0, 1.0, 0.0]<br>
&gt;<br>
&gt;   UpdatePipeline()<br>
&gt;   current_file_name_csv = file_name_csv.replace(&#39;###file_number###&#39;,<br>
&gt; str(file_number_start))<br>
&gt;   writer = CreateWriter(directory_csv + current_file_name_csv, Slice2)<br>
&gt;   writer.FieldAssociation = &#39;Points&#39;<br>
&gt;   writer.UpdatePipeline()<br>
&gt;   del writer<br>
&gt;<br>
&gt;   Delete(Slice2)<br>
&gt;   Delete(Slice1)<br>
&gt;   Delete(current_file)<br>
&gt;<br>
&gt;   files_to_go = (file_number_end-file_number_start)/file_interval<br>
&gt;   if files_to_go == 1:<br>
&gt;     case_word = &#39;file&#39;<br>
&gt;   else:<br>
&gt;     case_word = &#39;files&#39;<br>
&gt;   print current_file_name_csv + &#39; created, &#39; + str(files_to_go) + &#39; more &#39; +<br>
&gt; case_word + &#39; to go!&#39;<br>
&gt;<br>
&gt;   file_number_start += file_interval<br>
&gt;<br>
&gt; print &#39;Script finished!&#39;<br>
&gt;<br>
&gt; Best,<br>
&gt; Sebastian<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; 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><br>
&gt;<br>
&gt; 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><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
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><br>
<br>
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><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
</blockquote></div><br>
</div></div><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
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><br>
<br>
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><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br>