Sebastien:<div><br></div><div>Thank you! </div><div><br></div><div>That indeed what I was looking for. </div><div><br></div><div>Is there a place where one can find out about (look up) such things? </div><div><br></div><div>
I spent an hour or so yesterday trying to guess  writer.FileType=&#39;Ascii&#39;.</div><div><br></div><div>My apologies for not including a subject line on my first submission, and for any confusion </div><div>due to trying to send a file that is too large. New to the mailing list.</div>
<div><br></div><div>Thanks again!</div><div><br></div><div>Regards,</div><div>Tim</div><div><br><div class="gmail_quote">On Sat, Dec 1, 2012 at 8:42 AM, Sebastien Jourdain <span dir="ltr">&lt;<a href="mailto:sebastien.jourdain@kitware.com" target="_blank">sebastien.jourdain@kitware.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Here is the script that you should run<div><br></div><div><div>from paraview.simple import *</div><div><br></div><div>data = XMLPolyDataReader( FileName=[&#39;/.../file.vtp&#39;] )</div>
<div><br></div><div>smooth = Smooth(data)</div>
<div>smooth.NumberofIterations = 200</div><div><br></div><div>writer = CreateWriter(&quot;foo.ply&quot;, smooth)</div><div>writer.FileType = &#39;Ascii&#39;</div><div>writer.UpdatePipeline()</div></div><div class="HOEnZb">
<div class="h5"><div><br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Fri, Nov 30, 2012 at 3:10 PM, Timothy Cale <span dir="ltr">&lt;<a href="mailto:drtsc.para@gmail.com" target="_blank">drtsc.para@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Sebastien:<div><br></div><div>The data file I attached to the previous version of this update note was too large. </div><div><br></div><div>I am resending the note with that file removed. </div><div><br></div><div>Tim </div>

<div><div>
<div><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Timothy Cale</b> <span dir="ltr">&lt;<a href="mailto:drtsc.para@gmail.com" target="_blank">drtsc.para@gmail.com</a>&gt;</span><br>


Date: Fri, Nov 30, 2012 at 1:03 PM<br>Subject: Re: [Paraview] (no subject)<br>To: Sebastien Jourdain &lt;<a href="mailto:sebastien.jourdain@kitware.com" target="_blank">sebastien.jourdain@kitware.com</a>&gt;<br>Cc: &quot;<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>&quot; &lt;<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>&gt;<br>


<br><br>Update:<div><br></div><div>I am able to write a ply file using CreateWriter (see attached first_stab.py and nano....vtp files). </div><div>But the ply file is in binary.</div><div><br></div><div>I looked around for more than an hour to find out how to write the file in ascii - to no avail. </div>



<div><br></div><div>Any hints?</div><div><br></div><div>Aside: When I put in 0 (for ascii) as a third arg. to CreateWriter, pvpython complained about </div><div>having more than 2 arguments. I note that in the paraview users guide, CreateWriter has </div>



<div>several arguments in some cases. help(CreateWriter) indicates that more than 2 arguments </div><div>can be used:</div><div><br></div><div>
<p style="margin:0px"><span style="font-family:Courier;font-size:9pt">&gt;&gt;&gt; help(CreateWriter)</span></p>
<p style="margin:0px"><span style="font-family:&#39;Courier&#39;;font-size:9pt;color:#009600">Help on function CreateWriter in module paraview.simple:</span></p>
<p style="margin:0px;font-family:Courier;font-size:9pt;color:rgb(0,150,0)"><br></p>
<p style="margin:0px"><span style="font-family:&#39;Courier&#39;;font-size:9pt;color:#009600">CreateWriter(filename, proxy=None, **extraArgs)</span></p>
<p style="margin:0px"><span style="font-family:&#39;Courier&#39;;font-size:9pt;color:#009600">    Creates a writer that can write the data produced by the source proxy in</span></p>
<p style="margin:0px"><span style="font-family:&#39;Courier&#39;;font-size:9pt;color:#009600">    the given file format (identified by the extension). If no source is</span></p>
<p style="margin:0px"><span style="font-family:&#39;Courier&#39;;font-size:9pt;color:#009600">    provided, then the active source is used. This doesn&#39;t actually write the</span></p>
<p style="margin:0px"><span style="font-family:&#39;Courier&#39;;font-size:9pt;color:#009600">    data, it simply creates the writer and returns it.</span></p></div><div><br></div><div>Regards,</div><div>Tim</div><div>
<div><div><br>
<div class="gmail_quote">On Fri, Nov 30, 2012 at 10:15 AM, Timothy Cale <span dir="ltr">&lt;<a href="mailto:drtsc.para@gmail.com" target="_blank">drtsc.para@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



Sebastien:<div><br></div><div>Good question: </div><div><br></div><div>My goal is to have a script which smooths results between simulation steps (fortran codes). </div><div><br></div><div>I use paraview to view results, and the smoothing filter in paraview seems to do what I want. </div>




<div><br></div><div>I want to start with a Trace-generated python script, and edit it to write the vertices and element </div><div>info to a file (.ply would be nice) that the next code can read.</div><div><br></div><div>




So, fortunately for me (in some sense), I decided to upgrade my ubuntu OS to 12.10. This has </div><div>paraview 3.14.1-6build1 on its software list (aptitude).</div><div><br></div><div>This version corrected a bug (with pvpython) in the version of paraview 3.14 that I was using. </div>




<div>(I also spent a day trying to get/install other versions. That was not very successful.)</div><div><br></div><div>Now if I import the trace generated py file, it pops up (and stays). Not a very good image, but it is </div>




<div>a start!</div><div><br></div><div>Being new to python and paraview, this is quite a step.</div><div><br></div><div>Any suggestions as to how to write vertex/node info would be appreciated.</div><div><br></div><div><br>




</div><div>Thanks,</div><div>Tim</div><div><div><div><br><div class="gmail_quote">On Thu, Nov 29, 2012 at 7:41 PM, Sebastien Jourdain <span dir="ltr">&lt;<a href="mailto:sebastien.jourdain@kitware.com" target="_blank">sebastien.jourdain@kitware.com</a>&gt;</span> wrote:<br>




<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I don&#39;t know ? what your script is supposed to do ? Render an image and quit ?<div class="gmail_extra"><br><br><div class="gmail_quote">




<div><div>On Thu, Nov 29, 2012 at 1:19 PM, Timothy Cale <span dir="ltr">&lt;<a href="mailto:drtsc.para@gmail.com" target="_blank">drtsc.para@gmail.com</a>&gt;</span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div>I am using paraview 3.14 (64 bit, ubuntu 12.04 vm on a MBP).</div><div><br></div>
<div>I am trying to run pvpython to view .py files generated using Trace:</div>
<div><br></div><div>&#39;which&#39; pvpython&#39; yields: /usr/bin/pvpython</div>
<div><br></div><div>&#39;pvpython&#39; yields: Error converting executable file &quot;/usr/bin/../lib/paraview/pvpython&quot; to real path: No such file or directory</div>
<div><br></div><div>So, /usr/bin/python seems to be looking for /usr/lib/paraview/pvpython</div><div><br></div><div>Which is indeed not there. </div>
<div><br></div><div>I uninstalled (purged) and installed 3.14 again. Same thing.</div><div><br></div><div>BTW: I did see the notes regarding 3.14.1-2 from ~6 months ago, but cannot tell which 3.14 binary installer is on the </div>







<div>Paraview download page. </div><div><br></div><div>Nevertheless, I downloaded the 3.14 tar-ball.</div><div><br></div><div>When I run a .py script generated using trace, an image pops up for a second, then disappears. </div>






<div><br></div><div>BTW: The same thing happens with 3.98, at least on a companion machine.</div><div><br></div><div>What am I missing?</div><div><br></div><div>Thanks,</div><div>Tim<br><div><br></div><div><br></div></div>







<br></div></div>_______________________________________________<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></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>