<div dir="ltr">Great!  Thank you for reporting the issues, that was very helpful for improving the script.<br><br>Pat<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 19, 2013 at 3:14 PM, petrinic <span dir="ltr">&lt;<a href="mailto:petrinic@student.ethz.ch" target="_blank">petrinic@student.ethz.ch</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word"><div>Hi, now it works perfectly!</div>
<div>
Thank you for your help!</div><div><br></div><div>All the best</div><div><br></div><div>Claudio</div><div><br></div><span><div style="border-right:medium none;padding-right:0in;padding-left:0in;padding-top:3pt;text-align:left;font-size:11pt;border-bottom:medium none;font-family:Calibri;border-top:#b5c4df 1pt solid;padding-bottom:0in;border-left:medium none">

<span style="font-weight:bold">From: </span> Pat Marion &lt;<a href="mailto:pat.marion@kitware.com" target="_blank">pat.marion@kitware.com</a>&gt;<br><span style="font-weight:bold">Date: </span> Wed, 19 Jun 2013 14:37:49 -0400<br>

<span style="font-weight:bold">To: </span> Claudio Petrini &lt;<a href="mailto:petrinic@student.ethz.ch" target="_blank">petrinic@student.ethz.ch</a>&gt;, ParaView &lt;<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>&gt;<div>

<div class="h5"><br><span style="font-weight:bold">Subject: </span> Re: [Paraview] paraview to kiwi macro<br></div></div></div><div><div class="h5"><div><br></div><div dir="ltr"><div>Hi, sorry about that!  It&#39;s another typo in the script, this time the typo is only exposed if you have camera parallel projection enabled (instead of perspective projection).  I uploaded a new version of the script that corrects the typo, so please re-download:<br>

<br><a href="http://packages.kitware.com/item/3021" target="_blank">http://packages.kitware.com/item/3021</a><br><br></div>However, KiwiViewer will set the view projection to perspective by default, not parallel projection, so if you set the camera position in paraview using parallel projection then the camera position might not be optimal in KiwiViewer&#39;s perspective, so I would recommend that you setup your view with perspective mode before exporting.<br>

<br>Pat<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 19, 2013 at 2:25 PM, petrinic <span dir="ltr">&lt;<a href="mailto:petrinic@student.ethz.ch" target="_blank">petrinic@student.ethz.ch</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div style="font-size:14px;font-family:Calibri,sans-serif">Hi Pat, </div><div style="font-size:14px;font-family:Calibri,sans-serif">



Thank you for the advice! Yes I&#39;m using the Paraview version 4.0 and I changed the line 179 as you said. Now it gives me an other error:</div><div><p style="margin-right:0px;text-indent:0px;font-size:14px;margin-left:0px;margin-bottom:0px;font-family:Calibri,sans-serif;margin-top:0px">

<span style="font-size:13pt;font-family:&#39;Courier&#39;">&gt;&gt;&gt; </span><span style="font-family:&#39;Courier&#39;;font-size:13pt;color:#009600">exporting to /Users/claudiop/Desktop/PVExport-2013-06-19T20:20:15</span></p>

<div><p style="margin-right:0px;text-indent:0px;font-size:14px;margin-left:0px;margin-bottom:0px;font-family:Calibri,sans-serif;margin-top:0px"><span style="font-family:&#39;Courier&#39;;font-size:13pt;color:#ff0000">Traceback (most recent call last):</span></p>

<p style="margin-right:0px;text-indent:0px;font-size:14px;margin-left:0px;margin-bottom:0px;font-family:Calibri,sans-serif;margin-top:0px"><span style="font-family:&#39;Courier&#39;;font-size:13pt;color:#ff0000">  File &quot;&lt;string&gt;&quot;, line 202, in &lt;module&gt;</span></p>

<p style="margin-right:0px;text-indent:0px;font-size:14px;margin-left:0px;margin-bottom:0px;font-family:Calibri,sans-serif;margin-top:0px"><span style="font-family:&#39;Courier&#39;;font-size:13pt;color:#ff0000">  File &quot;&lt;string&gt;&quot;, line 192, in exportToDesktop</span></p>

<p style="margin-right:0px;text-indent:0px;font-size:14px;margin-left:0px;margin-bottom:0px;font-family:Calibri,sans-serif;margin-top:0px"><span style="font-family:&#39;Courier&#39;;font-size:13pt;color:#ff0000">  File &quot;&lt;string&gt;&quot;, line 179, in exportInDirectory</span></p>

</div><p style="margin-right:0px;text-indent:0px;font-size:14px;margin-left:0px;margin-bottom:0px;font-family:Calibri,sans-serif;margin-top:0px"><span style="font-family:&#39;Courier&#39;;font-size:13pt;color:#ff0000">  File &quot;&lt;string&gt;&quot;, line 126, in exportViewToDirectory</span></p>

<p style="margin-right:0px;text-indent:0px;font-size:14px;margin-left:0px;margin-bottom:0px;font-family:Calibri,sans-serif;margin-top:0px"><span style="font-family:&#39;Courier&#39;;font-size:13pt;color:#ff0000">  File &quot;&lt;string&gt;&quot;, line 31, in cameraProperties</span></p>

<p style="margin-right:0px;text-indent:0px;font-size:14px;margin-left:0px;margin-bottom:0px;font-family:Calibri,sans-serif;margin-top:0px"><span style="font-family:&#39;Courier&#39;;font-size:13pt;color:#ff0000">TypeError: &#39;float&#39; object is not iterable</span></p>

<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><font color="#ff0000" face="Courier" size="4"><br></font></p><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">



It is another bug in the script or I&#39;m doing something wrong? Can you help me again with this problem?</p><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">Thank you</p><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">



All the best</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">Claudio</p>

<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><font color="#ff0000" face="Courier" size="4"><br></font></p></div><div style="font-size:14px;font-family:Calibri,sans-serif"><br>

</div><span style="font-size:14px;font-family:Calibri,sans-serif"><div style="border-right:medium none;padding-right:0in;padding-left:0in;padding-top:3pt;text-align:left;font-size:11pt;border-bottom:medium none;font-family:Calibri;border-top:#b5c4df 1pt solid;padding-bottom:0in;border-left:medium none">

<span style="font-weight:bold">From: </span> Pat Marion &lt;<a href="mailto:pat.marion@kitware.com" target="_blank">pat.marion@kitware.com</a>&gt;<br><span style="font-weight:bold">Date: </span> Wed, 19 Jun 2013 12:50:57 -0400<br>

<span style="font-weight:bold">To: </span> Claudio Petrini &lt;<a href="mailto:petrinic@student.ethz.ch" target="_blank">petrinic@student.ethz.ch</a>&gt;<br><span style="font-weight:bold">Cc: </span> ParaView &lt;<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>&gt;<br>

<span style="font-weight:bold">Subject: </span> Re: [Paraview] paraview to kiwi macro<br></div><div><div><div><br></div><div dir="ltr"><div><div><div>Hi Claudio,<br><br></div>Thanks for reporting this issue.  It&#39;s a bug in the script, I think it might only be an issue if using the script in ParaView 4.0, is that the version you are using?  Anyway, to correct it, please edit line 179 and change:<br>

<br>    exportViewToDirectory(GetRenderView(), outDir)<br><br></div>to<br><br>    exportViewToDirectory(smp.GetRenderView(), outDir)<br><br></div>I will upload a new version of the script, too, with this correction.<br><br>





Pat<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 19, 2013 at 12:36 PM, petrinic <span dir="ltr">&lt;<a href="mailto:petrinic@student.ethz.ch" target="_blank">petrinic@student.ethz.ch</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word"><div>Hi, </div><div>I&#39;m trying to export paraview data to my Desktop with the macro &quot;paraview_to_kiwi.py&quot;, so that I can put it on Kiwiviewer on my iPhone.</div>

<div>When I start macro it doesn&#39;t work, and in the Phyton shell I have this output:</div><div><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-size:13pt;font-family:&#39;Courier&#39;">&gt;&gt;&gt; </span><span style="font-family:&#39;Courier&#39;;font-size:13pt;color:#009600">exporting to /Users/claudiop/Desktop/PVExport-2013-06-19T18:33:23</span></p>

<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:&#39;Courier&#39;;font-size:13pt;color:#ff0000">Traceback (most recent call last):</span></p><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">

<span style="font-family:&#39;Courier&#39;;font-size:13pt;color:#ff0000">  File &quot;&lt;string&gt;&quot;, line 202, in &lt;module&gt;</span></p><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">

<span style="font-family:&#39;Courier&#39;;font-size:13pt;color:#ff0000">  File &quot;&lt;string&gt;&quot;, line 192, in exportToDesktop</span></p><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">

<span style="font-family:&#39;Courier&#39;;font-size:13pt;color:#ff0000">  File &quot;&lt;string&gt;&quot;, line 179, in exportInDirectory</span></p><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">

<span style="font-family:&#39;Courier&#39;;font-size:13pt;color:#ff0000">NameError: global name &#39;GetRenderView&#39; is not defined</span></p></div><div><br></div><div><br></div><div><br></div><div>Does anyone have an Idea how to solve this problem and make it works?</div>

<div>Thank you</div><div>All the best,</div><div><br></div><div>Claudio</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></div></div></div>

</span></div></blockquote></div><br></div></div></div></span></div>
</blockquote></div><br></div>