Use the Paraview trace feature (http://paraview.org/Wiki/Python_GUI_Tools#Trace) in the GUI when you do it once and save that.
Then it's easy to edit the resulting script to loop over the files you need. Tim ----- Original Message ----- From: "Celia Bremer" <fuw...@hotmail.com> To: paraview@paraview.org Sent: Thursday, November 15, 2012 7:20:12 PM Subject: [Paraview] help with a simple script? Hello, 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". --- from paraview.simple import * import paraview.vtk.io as vtk_io servermanager.LoadState("test.pvsm") o=FindSource("Outer Mesh") # this is the name of the Gaussian resampling filter SetActiveSource(o) # it shows up if I do Show(o) so I know PV found it writer = vtk_io.vtkXMLImageDataWriter() writer.SetInput(o) # TypeError: argument 1: method requires a VTK object # how do I specify that I want o as input, and that I want to save it as a file series? writer.SetFileName("test.vti") writer.Write() # delete everything, load another state, repeat --- I would appreciate any pointers. Celia _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview