Hi Celia,<div><br></div><div>if you use the vtkWriter directly without using a proxy you will need to do:</div><div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">writer.SetInput(o.GetClientSideObject())</span><br>
</div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">But the better way to do that is by following </span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><a href="http://www.paraview.org/Wiki/ParaView/Python_Scripting#Writing_Data_Files_.28ParaView_3.9_or_later.29">http://www.paraview.org/Wiki/ParaView/Python_Scripting#Writing_Data_Files_.28ParaView_3.9_or_later.29</a><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><br></div><div>And maybe, you might be interested in looking at some other examples here: <a href="http://www.paraview.org/Wiki/Python_recipes">http://www.paraview.org/Wiki/Python_recipes</a></div><div><br>
</div><div>Hope that helps,</div><div><br></div><div>Seb</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Nov 15, 2012 at 10:22 PM, Celia Bremer <span dir="ltr"><<a href="mailto:fuwsle@hotmail.com" target="_blank">fuwsle@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Tim,<br>
Thank you. I should've said that I tried that but it didn't work. The "regular" trace gave a bunch of errors when I tried to run it. When I did smtrace.start_trace(CaptureAllProperties=True) , that recorded more stuff, like the parameters that I used in the various filters, and it didn't give any errors when I ran it, but it also didn't save the VTI files, which is my goal.<br>
The trace didn't include any output filenames so, apparently, the saving part doesn't get recorded. The last line in the trace is just Render(). Rendering is a part of the process when doing "Save data", at least when the object is hidden like in my pipeline, so it makes sense that it's last. But the rest of what's involved in "save data" isn't captured by the trace.<br>
<span class="HOEnZb"><font color="#888888">Celia<br>
</font></span><div class="hm HOEnZb"><br>
----------------------------------------<br>
> Date: Thu, 15 Nov 2012 19:22:24 -0500<br>
> From: <a href="mailto:tim.gallagher@gatech.edu">tim.gallagher@gatech.edu</a><br>
> To: <a href="mailto:fuwsle@hotmail.com">fuwsle@hotmail.com</a><br>
> CC: <a href="mailto:paraview@paraview.org">paraview@paraview.org</a><br>
> Subject: Re: [Paraview] help with a simple script?<br>
</div><div class="HOEnZb"><div class="h5">><br>
> Use the Paraview trace feature (<a href="http://paraview.org/Wiki/Python_GUI_Tools#Trace" target="_blank">http://paraview.org/Wiki/Python_GUI_Tools#Trace</a>) in the GUI when you do it once and save that.<br>
><br>
> Then it's easy to edit the resulting script to loop over the files you need.<br>
><br>
> Tim<br>
><br>
> ----- Original Message -----<br>
> From: "Celia Bremer" <<a href="mailto:fuwsle@hotmail.com">fuwsle@hotmail.com</a>><br>
> To: <a href="mailto:paraview@paraview.org">paraview@paraview.org</a><br>
> Sent: Thursday, November 15, 2012 7:20:12 PM<br>
> Subject: [Paraview] help with a simple script?<br>
><br>
><br>
><br>
> Hello,<br>
><br>
> I want to write a script that would open a saved state, select one of the objects, and save data from that object as a VTI file series. I can do this with the GUI, but it takes many hours to do this to each file and I have about 60 of them, so a script would be nice since I could loop through the different states. But I can't figure out how to tell PV what I want to render, and I also can't find how to access options like "save time series".<br>
><br>
> ---<br>
> from paraview.simple import *<br>
> import <a href="http://paraview.vtk.io" target="_blank">paraview.vtk.io</a> as vtk_io<br>
> servermanager.LoadState("test.pvsm")<br>
> o=FindSource("Outer Mesh") # this is the name of the Gaussian resampling filter<br>
> SetActiveSource(o) # it shows up if I do Show(o) so I know PV found it<br>
><br>
> writer = vtk_io.vtkXMLImageDataWriter()<br>
> writer.SetInput(o)<br>
> # TypeError: argument 1: method requires a VTK object<br>
> # how do I specify that I want o as input, and that I want to save it as a file series?<br>
><br>
> writer.SetFileName("test.vti")<br>
> writer.Write()<br>
><br>
> # delete everything, load another state, repeat<br>
> ---<br>
><br>
> I would appreciate any pointers.<br>
><br>
> Celia<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>
</div></div></blockquote></div><br></div>