I believe the filter won't get deleted until after the proxy goes out of scope. If I'm right, you need to call Delete() on it and then have the variable that's holding the proxy either go out of scope or set to something else.<br>
<br>Andy<br><br><div class="gmail_quote">On Wed, Dec 19, 2012 at 4:36 PM, David E DeMarle <span dir="ltr"><<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>></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'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&D Engineer<br>
21 Corporate Drive<br>
Clifton Park, NY 12065-8662<br>
Phone: <a href="tel:518-881-4909" value="+15188814909">518-881-4909</a><br>
<br>
<br>
On Wed, Dec 19, 2012 at 4:25 PM, Sebastian <<a href="mailto:sebastiansturm@web.de">sebastiansturm@web.de</a>> wrote:<br>
> Hello Karl,<br>
><br>
> thank you for your message. I am using Paraview 3.14.1 (64bit).<br>
><br>
> This is what my script looks like:<br>
><br>
> # SETTINGS<br>
> directory_pvtu = '/scratch/mesh3mm_SEM/'<br>
> directory_csv = '/scratch/mesh3mm_SEM/Z085_velocity_data/'<br>
> file_number_start = 373527<br>
> file_number_end = 640332<br>
> file_interval = 693<br>
> file_name_pvtu = 'mesh3mm_SEM###file_number###.pvtu'<br>
> file_name_csv = 'mesh3mm_SEM###file_number###.csv'<br>
><br>
> print 'Script started!'<br>
><br>
> try: paraview.simple<br>
> except: from paraview.simple import *<br>
><br>
> while file_number_start <= file_number_end :<br>
><br>
> current_file_name_pvtu = file_name_pvtu.replace('###file_number###',<br>
> str(file_number_start))<br>
> current_file = XMLPartitionedUnstructuredGridReader( FileName=[directory_pvtu<br>
> + current_file_name_pvtu] )<br>
><br>
> current_file.PointArrayStatus = ['Velocity']<br>
><br>
> SetActiveSource(current_file)<br>
><br>
> Slice1 = Slice( SliceType = 'Plane' )<br>
> Slice1.SliceOffsetValues = [0.0]<br>
> Slice1.SliceType.Origin = [0.0, 0.0, 0.136711]<br>
> Slice1.SliceType.Normal = [0.0, 0.0, 1.0]<br>
><br>
> SetActiveSource(Slice1)<br>
><br>
> Slice2 = Slice( SliceType = 'Plane' )<br>
> Slice2.SliceOffsetValues = [0.0]<br>
> Slice2.SliceType.Origin = [0.0, 0.227757, 0.0]<br>
> Slice2.SliceType.Normal = [0.0, 1.0, 0.0]<br>
><br>
> UpdatePipeline()<br>
> current_file_name_csv = file_name_csv.replace('###file_number###',<br>
> str(file_number_start))<br>
> writer = CreateWriter(directory_csv + current_file_name_csv, Slice2)<br>
> writer.FieldAssociation = 'Points'<br>
> writer.UpdatePipeline()<br>
> del writer<br>
><br>
> Delete(Slice2)<br>
> Delete(Slice1)<br>
> Delete(current_file)<br>
><br>
> files_to_go = (file_number_end-file_number_start)/file_interval<br>
> if files_to_go == 1:<br>
> case_word = 'file'<br>
> else:<br>
> case_word = 'files'<br>
> print current_file_name_csv + ' created, ' + str(files_to_go) + ' more ' +<br>
> case_word + ' to go!'<br>
><br>
> file_number_start += file_interval<br>
><br>
> print 'Script finished!'<br>
><br>
> Best,<br>
> Sebastian<br>
><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>
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>