Hi Celia,<div><br></div><div>I think you found a bug, but I think I have something for you.</div><div>The following method should clear the view/layouts.</div><div><br></div><div>Seb</div><div><br></div><div>$ <span style="color:rgb(0,0,0);font-family:Courier;font-size:13pt">def clearLayout():</span></div>
<div><span style="color:rgb(0,0,0);font-family:Courier;font-size:13pt">... pxm = servermanager.ProxyManager()</span></div>

<p style="margin:0px"><span style="font-family:Courier;font-size:13pt;color:rgb(0,0,0)">...   for layout in GetLayouts():</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:13pt;color:rgb(0,0,0)">...   pxm.UnRegisterProxy(&quot;layouts&quot;, </span><span style="color:rgb(0,0,0);font-family:Courier;font-size:17px">layout</span><span style="font-family:Courier;font-size:13pt;color:rgb(0,0,0)">[0], GetLayouts()[</span><span style="color:rgb(0,0,0);font-family:Courier;font-size:17px">layout</span><span style="font-family:Courier;font-size:13pt;color:rgb(0,0,0)">])</span></p>
<div><br></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 16, 2012 at 2:28 PM, Celia Bremer <span dir="ltr">&lt;<a href="mailto:fuwsle@hotmail.com" target="_blank">fuwsle@hotmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Seb,<br>
<br>
When I say that the OpenGL window freezes, I mean the window is unresponsive in that I can&#39;t minimize it, and Windows task manager says &quot;Not Responding&quot;. There&#39;s nothing in the window except for the purple background, even when there should be something, e.g. if I did Show(o) before calling Render(), where o is one of the pipeline objects.<br>

<br>
The thing I called layout windows, and I suppose it&#39;s really called something else (view layouts?), happens when I run the script from the Python shell that comes with the GUI. I&#39;m referring to the tabs, &quot;Layout #1&quot;, &quot;Layout #2&quot;, etc. Here:<br>

<br>
&gt;&gt;&gt; paraview version 3.14.1, Date: 2012-02-17<br>
from paraview.simple import *<br>
&gt;&gt;&gt; GetLayouts()<br>
{(&#39;ViewLayout1&#39;, &#39;275&#39;): &lt;paraview.servermanager.ViewLayout object at 0x0000000010FB4748&gt;}<br>
&gt;&gt;&gt; servermanager.LoadState(&quot;testpipeline.pvsm&quot;)<br>
&gt;&gt;&gt; GetLayouts()<br>
{(&#39;ViewLayout1&#39;, &#39;275&#39;): &lt;paraview.servermanager.ViewLayout object at 0x0000000010FB4748&gt;, (&#39;ViewLayout5&#39;, &#39;2353&#39;): &lt;paraview.servermanager.ViewLayout object at 0x0000000010FB47B8&gt;}<br>

&gt;&gt;&gt; servermanager.LoadState(&quot;testpipeline.pvsm&quot;)<br>
&gt;&gt;&gt; GetLayouts()<br>
{(&#39;ViewLayout1&#39;, &#39;275&#39;): &lt;paraview.servermanager.ViewLayout object at 0x0000000010FB4748&gt;, (&#39;ViewLayout5&#39;, &#39;3972&#39;): &lt;paraview.servermanager.ViewLayout object at 0x0000000012EC3240&gt;, (&#39;ViewLayout5&#39;, &#39;2353&#39;): &lt;paraview.servermanager.ViewLayout object at 0x0000000010FB47B8&gt;}<br>

<br>
This happens even if I use an empty state file, i.e. what I get when I open Paraview GUI, save state, save as empty.pvsm. If I load this state from the GUI, it opens in the original layout window, ViewLayout1, without any craziness. If I open it from the shell as above, the first tab splits into 2 views, the right view looks all weird (attached), a new tab opens and the state file is loaded into a second tab. If I load the state file again, then the second tab splits like the first (and if there was any content, it stays on the left hand side), a third tab opens, and the content shows up in the third tab. And so on. The names of these new tabs depend on the state file (above: 1 5 5, it might be 3 1 3 3, or if I use an empty state file, then it&#39;s 1 1 1 1), so I don&#39;t know what&#39;s the deal with that, but as long as I can close them before moving on to the next state file, I don&#39;t think it&#39;ll cause problems.<br>

<br>
Celia<br>
<br>
________________________________<br>
&gt; Date: Fri, 16 Nov 2012 13:40:36 -0500<br>
<div class="im">&gt; Subject: Re: [Paraview] help with a simple script?<br>
</div>&gt; From: <a href="mailto:sebastien.jourdain@kitware.com">sebastien.jourdain@kitware.com</a><br>
&gt; To: <a href="mailto:fuwsle@hotmail.com">fuwsle@hotmail.com</a><br>
&gt; CC: <a href="mailto:dave.demarle@kitware.com">dave.demarle@kitware.com</a>; <a href="mailto:paraview@paraview.org">paraview@paraview.org</a><br>
<div class="im">&gt;<br>
&gt; Hi Celia,<br>
&gt;<br>
&gt; I&#39;m not sure to follow what you mean by &quot;it freezes&quot; and &quot;new layout window&quot;.<br>
&gt;<br>
&gt; When you render something from Python, the window is not interactive,<br>
&gt; so maybe that&#39;s what you call freeze. And you need to manually call<br>
&gt; Render() to update its content.<br>
&gt; Regarding the layout window, I don&#39;t really have a clue what that could be.<br>
&gt;<br>
&gt; So I let you explain a bit more.<br>
&gt;<br>
&gt; Thanks,<br>
&gt;<br>
&gt; Seb<br>
&gt;<br>
&gt;<br>
&gt; On Fri, Nov 16, 2012 at 1:21 PM, Celia Bremer<br>
</div><div class="im">&gt; &lt;<a href="mailto:fuwsle@hotmail.com">fuwsle@hotmail.com</a>&lt;mailto:<a href="mailto:fuwsle@hotmail.com">fuwsle@hotmail.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt; Thank you. That worked but I still have problems: as soon as the OpenGL<br>
&gt; window opens to render, it freezes, even if all the objects are hidden.<br>
&gt; I think I&#39;ll have to do it from the Python shell from PV instead. I<br>
&gt; have just one more question.<br>
&gt;<br>
&gt; When I load a state using LoadState(), that automatically opens a new<br>
&gt; layout window. If I open the same state file from the GUI, no new<br>
&gt; window is opened, so I don&#39;t think it&#39;s a property stored in the state<br>
&gt; file. If I&#39;m going to loop through 60 state files, I imagine all these<br>
&gt; windows would become a problem. How do I either close the window, or<br>
&gt; prevent it from opening in the first place?<br>
&gt;<br>
&gt; Celia<br>
&gt;<br>
&gt; ----------------------------------------<br>
</div>&gt;&gt; From: <a href="mailto:dave.demarle@kitware.com">dave.demarle@kitware.com</a>&lt;mailto:<a href="mailto:dave.demarle@kitware.com">dave.demarle@kitware.com</a>&gt;<br>
<div class="im">&gt;&gt; Date: Fri, 16 Nov 2012 10:52:45 -0500<br>
&gt;&gt; Subject: Re: [Paraview] help with a simple script?<br>
</div>&gt;&gt; To: <a href="mailto:fuwsle@hotmail.com">fuwsle@hotmail.com</a>&lt;mailto:<a href="mailto:fuwsle@hotmail.com">fuwsle@hotmail.com</a>&gt;<br>
&gt;&gt; CC:<br>
&gt; <a href="mailto:sebastien.jourdain@kitware.com">sebastien.jourdain@kitware.com</a>&lt;mailto:<a href="mailto:sebastien.jourdain@kitware.com">sebastien.jourdain@kitware.com</a>&gt;;<br>
&gt; <a href="mailto:paraview@paraview.org">paraview@paraview.org</a>&lt;mailto:<a href="mailto:paraview@paraview.org">paraview@paraview.org</a>&gt;<br>
<div class="HOEnZb"><div class="h5">&gt;&gt;<br>
&gt;&gt;&gt; from paraview import servermanager<br>
&gt;&gt;&gt; from paraview.simple import *<br>
&gt;&gt;&gt; servermanager.LoadState(&quot;test.pvsm&quot;)<br>
&gt;&gt;<br>
&gt;&gt; SetActiveView(GetRenderView()) #you are missing this<br>
&gt;&gt;<br>
&gt;&gt;&gt; view = GetActiveView()<br>
&gt;&gt;&gt; view.ViewTime<br>
&gt;&gt;&gt;<br>
&gt;                                         </div></div></blockquote></div><br></div>