<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;">Hi David,<br>
<br>
thanks. What about saving it in to xdmf file format? Is it as simple as doing<br>
<br>
writer=CreateWrite("filename.xmf", Cone1)? <br>
<br>
or do I need a different writer class?<br>
<br>
thanks<br>
-simon<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF638330"><font color="#000000" face="Tahoma" size="2"><b>From:</b> David E DeMarle [dave.demarle@kitware.com]<br>
<b>Sent:</b> Thursday, April 03, 2014 12:42 PM<br>
<b>To:</b> Su, Simon M CTR USAF (US)<br>
<b>Cc:</b> paraview@paraview.org<br>
<b>Subject:</b> Re: [Paraview] ParaView python scripting - capture from ParaView GUI<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr"><span style="font-family:Tahoma; font-size:10pt">------------------ start python script ------------------</span><br>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left-width:1px; border-left-color:rgb(204,204,204); border-left-style:solid; padding-left:1ex">
<div>
<div style="direction:ltr; font-size:10pt; font-family:Tahoma">
<p style="margin:0px; text-indent:0px">try: paraview.simple</p>
<p style="margin:0px; text-indent:0px">except: from paraview.simple import *</p>
<p style="margin:0px; text-indent:0px">paraview.simple._DisableFirstRenderCameraReset()</p>
<p style="margin:0px; text-indent:0px"><br>
</p>
<p style="margin:0px; text-indent:0px">Cone1 = Cone()</p>
<p style="margin:0px; text-indent:0px"><br>
</p>
<p style="margin:0px; text-indent:0px">RenderView1 = GetRenderView()</p>
<p style="margin:0px; text-indent:0px"><br>
</p>
<p style="margin:0px; text-indent:0px">DataRepresentation1 = Show()</p>
<p style="margin:0px; text-indent:0px">DataRepresentation1.ScaleFactor = 0.1</p>
<p style="margin:0px; text-indent:0px">DataRepresentation1.EdgeColor = [0.0, 0.0, 0.5000076295109483]</p>
<p style="margin:0px; text-indent:0px"><br>
</p>
<p style="margin:0px; text-indent:0px">RenderView1.CameraPosition = [0.0, 0.0, 3.2036135254332487]</p>
<p style="margin:0px; text-indent:0px">RenderView1.CameraClippingRange = [2.309882128879306, 4.336364527086367]</p>
<p style="margin:0px; text-indent:0px">RenderView1.CameraParallelScale = 0.8291561935301535</p>
<p style="margin:0px; text-indent:0px"><br>
</p>
<p style="margin:0px; text-indent:0px">Render()</p>
<p style="margin:0px; text-indent:0px"><br>
</p>
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>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>You don't need to strip anything off the output.</div>
<div><br>
</div>
To save results add:<br>
WriteImage("filename.png")<br>
To save the screenshot in png format<br>
<br>
And/Or add:<br>
<br>
writer= CreateWriter("filename.vtk", Cone1)<br>
writer.UpdatePipeline()<br>
<br>
to save the Cone1's data in vtk format</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>