<div dir="ltr">Marco,<div><br></div><div>Which part of your script isn't working? Are the files not being saved?</div><div><br></div><div>Thanks,</div><div>Cory</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 27, 2015 at 6:55 AM, Marco Kokic <span dir="ltr"><<a href="mailto:kokicm@student.ethz.ch" target="_blank">kokicm@student.ethz.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I found the reason for print cells_ None, which is that I used the wrong datareader, instead the script should look like this:<span class=""><br>
<br>
#!/usr/bin/pvpython<br>
<br>
#setup paraview connection<br>
from paraview.simple import *<br>
<br></span>
cells_ = XMLMultiBlockDataReader(FileName=['/home/me/Dokumente/TEST/Cells_0.vtm', '/home/me/Dokumente/TEST/Cells_100.vtm', '/home/me/Dokumente/TEST/Cells_200.vtm'])<span class=""><br>
<br>
# create a new 'Integrate Variables'<br></span>
integrateVariables1 = IntegrateVariables(Input=cells_)<br>
# set active source<br>
SetActiveSource(integrateVariables1)<span class=""><br>
# create a new 'Plot Selection Over Time'<br></span>
plotSelectionOverTime1 = PlotSelectionOverTime(Input=integrateVariables1)<br>
# save data<br>
SaveData('/home/me/Dokumente/TEST/TEST.csv', proxy=plotSelectionOverTime1)<br>
<br>
<br>
Still the rest of the script doesn't work. I tried to trace every step when using the gui and saved it as a macro. Doesn't work.<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
Am 26.11.2015 um 20:51 schrieb Marco Kokic:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear ParaViewers,<br>
<br>
I have written and tested the following script, which I hope is self-explanatory. It doesn't work though (print cells_ gives "None") and I can't see what I missed. I'm thankful for any suggestions.<br>
<br>
#!/usr/bin/pvpython<br>
<br>
#setup paraview connection<br>
from paraview.simple import *<br>
<br>
def my_range(start, end, step):<br>
while start <= end:<br>
yield start<br>
start += step<br>
<br>
def LoadMultipleFiles(FilePrefix, Low, High):<br>
for i in my_range(Low,High+1,100):<br>
reader = XMLMultiBlockDataReader(FileName='/path-to-files/' + FilePrefix + str(i) + '.vtm')<br>
<br>
cells_ = LoadMultipleFiles('Cells_', 0, 1000)<br>
print cells_<br>
<br>
# create a new 'Integrate Variables'<br>
#integrateVariables1 = IntegrateVariables(Input=cells_)<br>
# create a new 'Plot Selection Over Time'<br>
#plotSelectionOverTime1 = PlotSelectionOverTime(Input=integrateVariables1,Selection=None)<br>
# save data<br>
#SaveData('/path-to-files/output10_areaovertime.csv', proxy=plotSelectionOverTime1, Precision=5,UseScientificNotation=0,WriteAllTimeSteps=0)<br>
<br>
<br>
<br>
<br>
<br>
<br>
</blockquote>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Cory Quammen<br>R&D Engineer<br>Kitware, Inc.</div>
</div>