<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">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>
<style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
try: paraview.simple</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
except: from paraview.simple import *</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
paraview.simple._DisableFirstRenderCameraReset()</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<br>
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
Cone1 = Cone()</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<br>
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
RenderView1 = GetRenderView()</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<br>
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
DataRepresentation1 = Show()</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
DataRepresentation1.ScaleFactor = 0.1</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
DataRepresentation1.EdgeColor = [0.0, 0.0, 0.5000076295109483]</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<br>
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; 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; -qt-block-indent:0; text-indent:0px;">
RenderView1.CameraClippingRange = [2.309882128879306, 4.336364527086367]</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
RenderView1.CameraParallelScale = 0.8291561935301535</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<br>
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
Render()</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; 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<br>
-simon<br>
</div>
</body>
</html>