You can simply call UpdatePipeline() as follows:

from paraview.simple import *
....
UpdatePipeline(proxy=extractSelectionSource)

This will update the extract selection filter explicitly. Look at
help(UpdatePipeline) for details.

Utkarsh


On Sun, Apr 18, 2010 at 3:38 PM, Christian Werner
<christian.wer...@rwth-aachen.de> wrote:
> Hi Utkarsh,
>
> these are great news. I tried the python trace but not in combination with
> the extraction (what I acutally do need anyway....)
>
> As you might remember I am working around the "lack" of possibilty to select
> whole objects (cells with same RegionID). With the given
> SelectionQuerySource this workaround is complete.
>
> There remains one issue: At some point I call an ExtractSelection() in
> Python that is followed by a call to a vtk-Plugin (which writes the point
> data of the selected points to disk). The resulting file is empty, because
> the Extraction takes a few seconds and obviously the plugin has no valid
> input when being executed. Paraview also crashes as a consequence. When I am
> doing this manually (trigger ExtractSelection, wait until it's done, call
> the vtk Plugin to write the point data) everything works fine. I could just
> go ahead and do a dull time.sleep(3) between the extraction and the call to
> the plugin, but this certainly isn't good programming style.
>
> What can I do instead?
>
>
> Best regards,
> Christian
>
>
> Utkarsh Ayachit wrote:
>>
>> Yes, you can use the "SelectionQuerySource" to construct your query as
>> follows:
>>
>> selection_source_540 = SelectionQuerySource( InsideOut=0,
>> ArrayName='', HierarchicalLevel=-1, ProcessID=-1, ContainingCells=0,
>> DoubleValues=None, HierarchicalIndex=-1, FieldType='CELL',
>> ArrayComponent=0, Operator='IS_ONE_OF', TermMode='ID',
>> CompositeIndex=-1, IdTypeValues=0 )
>>
>> You can use the python trace recorder functionality to determine how
>> to create the query. You will, however have to "Extract Selection"
>> from the query (and hit apply) before the selection_source object will
>> appear in the trace.
>>
>> Utkarsh
>>
>>
>> On Sat, Apr 17, 2010 at 9:32 AM, Christian Werner
>> <christian.wer...@rwth-aachen.de> wrote:
>>
>>>
>>> Hello!
>>>
>>> Is there any chance that the new Edit->Find Data functionality is
>>> available
>>> in Python-Scripting?
>>>
>>>
>>> Best regards,
>>> Christian
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the ParaView Wiki at:
>>> http://paraview.org/Wiki/ParaView
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.paraview.org/mailman/listinfo/paraview
>>>
>>>
>
>
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to