[Paraview] Multiblock Dataset: Extract Block in Python

Bastil2001 at yahoo.de Bastil2001 at yahoo.de
Tue Jan 19 16:25:50 EST 2010


Thanks Utkarsh, Berk:

I found a similar posting:

http://www.mail-archive.com/paraview@paraview.org/msg02936.html. Is
there o bug for it so far?

My current workaround is to extract BLocks (from EnsightReader) and
numbering them using Python functinality:

dict ={}
source = GetActiveSource()
if not source:
    raise RuntimeError, "This macro needs an active pipeline object"
source.UpdatePipeline()
cdi = source.GetDataInformation().GetCompositeDataInformation()
blocks = cdi.GetNumberOfChildren()
for i in range(blocks):
    dict.update(cdi.GetDataInformation(i) : i+1)


Afterwards dictionary dict contains name of the block and its according
index. However it only works if:

    * Blocks are numbered starting from one without spaces

This was the case for all my tests so far. Is this always right?

Regards.


Am 19.01.2010 16:37, schrieb Utkarsh Ayachit:
> Currently there no easy way of extract blocks given there names.
> Please feel free to add a feature request to the bug tracker.
>
> http://paraview.org/Bug/
>
> Utkarsh
>
> On Fri, Jan 15, 2010 at 5:29 PM, BastiL2001 <bastil2001 at yahoo.de> wrote:
>   
>> Dear all,
>>
>> I want to extract certain zones (using name filtering) from an Ensight MultiBlock Reader.
>> Currently I have the names of the zones to extract in a Python list. I do not know how to proceed. I guess I need to get the IDs of these zones? How to do that? How to extract the zones?
>> I am working with Paraview 3.6.2 and the Trace did not help me much for this. Where do I get some more documentation than in the wiki? Thanks.
>>
>> Regards BastiL
>>
>>
>> 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
>>
>>     
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100119/0b7f2eaa/attachment.htm>


More information about the ParaView mailing list