<div dir="ltr"><div class="gmail_extra">I believe, the trace does not capture the inputs and the outputs. What you can do instead, is take the output of trace, add code to it for input and output and</div><div class="gmail_extra">
run using pvpython. </div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 3, 2014 at 11:56 AM, Su, Simon M CTR USAF (US) <span dir="ltr"><<a href="mailto:simon.m.su.ctr@mail.mil" target="_blank">simon.m.su.ctr@mail.mil</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-size:10pt;font-family:Tahoma">Hello there,<br>
<br>
I am trying to cook up a batch file for the visualization pipeline that I am doing on ParaView GUI so that I can run that same sequence in batch mode and in parallel using pvbatch. I can get most of the python script using the Tool->Start Trace option on ParaView
GUI. However, Start Trace didn't capture python script when I do a File->Save Data command.<br>
<br>
For example, if I open up ParaView 4.1.0 and do a Tool->Start Trace, and then load up a cone and hit Apply and then do a File-> Save Data into legacy vtk format, and then do a Tool->Stop Trace, I will get the following python script<br>
<br>
------------------ start python script ------------------<br>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
try: paraview.simple</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
except: from paraview.simple import *</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
paraview.simple._DisableFirstRenderCameraReset()</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
<br>
</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
Cone1 = Cone()</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
<br>
</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
RenderView1 = GetRenderView()</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
<br>
</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
DataRepresentation1 = Show()</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
DataRepresentation1.ScaleFactor = 0.1</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
DataRepresentation1.EdgeColor = [0.0, 0.0, 0.5000076295109483]</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
<br>
</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
RenderView1.CameraPosition = [0.0, 0.0, 3.2036135254332487]</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
RenderView1.CameraClippingRange = [2.309882128879306, 4.336364527086367]</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
RenderView1.CameraParallelScale = 0.8291561935301535</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
<br>
</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
Render()</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">
<br>
</p>
------------- end python script -------------------<br>
<br>
I will get the cone data saved to legacy vtk format in a file<br>
[simonsm@abc ~]$ cat test.vtk <br>
# vtk DataFile Version 3.0<br>
vtk output<br>
ASCII<br>
DATASET POLYDATA<br>
POINTS 7 float<br>
0.5 0 0 -0.5 0.5 0 -0.5 0.25 0.433013 <br>
-0.5 -0.25 0.433013 -0.5 -0.5 6.12323e-17 -0.5 -0.25 -0.433013 <br>
-0.5 0.25 -0.433013 <br>
POLYGONS 7 31<br>
6 6 5 4 3 2 1 <br>
3 0 1 2 <br>
3 0 2 3 <br>
3 0 3 4 <br>
3 0 4 5 <br>
3 0 5 6 <br>
3 0 6 1 <br>
<br>
So, what is the python script command I need to save the data and how do I turn the python script from the Start Trace output into python script that I can run with pvbatch? Anything I need to strip off the output?<br>
<br>
thanks<span class="HOEnZb"><font color="#888888"><br>
-simon<br>
</font></span></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><br clear="all"><div><br></div>-- <br>| Aashish Chaudhary <br>| R&D Engineer <br>| Kitware Inc. <br>| <a href="http://www.kitware.com">www.kitware.com</a>
</div></div>