Hi Biddiscombe,<div><br></div><div>I do a similar thing. But I use a Qt thread instead of a timer. The thread controls the entire progress. I define a iteration steps in the thread, e.g.,1024. In each iteration, the thread triggers the slot accept() method (in ParaView3/Qt/Components/pqObjectInspectorWidget), in which the pipeline is forced to update, then the source will call its RequestData() method and invoke the simulation program to get the data. Maybe it is more appropriate to let the simulation the control the entire progress, that is, when one step simulation is done, then it will notify the ParaView to do the corresponding rendering stuff. I just do it in the reverse way, because it is easier to implement. </div>
<div><br></div><div>========================</div><div><br></div><div>//the added thread class</div><div><br></div><div><div>pqSimulationThread::pqSimulationThread(pqObjectInspectorWidget* _gui){</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>this-&gt;gui=_gui;</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>connect(this,SIGNAL(oneStepSimulationFinished()),this-&gt;gui,SLOT(accept()));</div><div>}</div><div><br></div><div>pqSimulationThread::~pqSimulationThread(){</div>
<div>}</div><div><br></div><div>void pqSimulationThread::run(){</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>for(int i=0;i&lt;NUM_ITERATION;i++){</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>emit this-&gt;oneStepSimulationFinished();</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>//for synchronization</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>mutex.lock();</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>renderringFinishedCondatin.wait(&amp;mutex);</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>mutex.unlock();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div>}</div></div><div><br></div><div>=======================</div>
<div><br></div><div>// in the method accept() of pqObjectInspectorWidget</div><div><br></div><div>//force the pipeline to update</div><div>// i add a property to the source </div><div>//and any filters used will need this property too</div>
<div><br></div><div><div>source-&gt;pqProxy::setModifiedState(pqProxy::MODIFIED);</div><div>vtkSMSourceProxy * vp  = vtkSMSourceProxy::SafeDownCast(source-&gt;getProxy());</div><div>vp-&gt;InvokeCommand(&quot;FakePropertyForUpdate&quot;);</div>
</div><div><br></div><div>=======================</div><div><br></div><div>Then do some other little changes it will work with the simulation program. I hope this can be of some help.</div><div><br></div><div>By the way, I hate the added property &quot;FakePropertyForUpdate&quot; , but I do not know how to remove it . I have tried many other methods to force the pipeline to update but got nothing good. And I also want to change the logic to be more natural, that is, let the simulation program to control the whole progress. I appreciate any help from anybody.</div>
<div><br></div><div>Thanks.</div><div><br></div><div>-Ning<br><br><div class="gmail_quote">On Tue, Jun 1, 2010 at 3:06 AM, Biddiscombe, John A. <span dir="ltr">&lt;<a href="mailto:biddisco@cscs.ch">biddisco@cscs.ch</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Utkarsh<br>
<div class="im"><br>
&gt; It is possible that the timer times out in middle of a progress event<br>
&gt; which happens while filters are executing.<br>
<br>
<br>
</div>OK. This we have detected, though what progress is going on I&#39;m unsure about (!) - by which I mean that the only thing paraview should be doing is updating our stuff and we block more updates whilst one is happening.<br>

<br>
Question : Is there a mutex of any kind on the update vtk objects, or update pipeline stuff which we can make use of to ensure that only one pull from the server occurs at any given time?<br>
<br>
JB<br>
<div><div></div><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br></div>