[Paraview] How to access XMLPUnstructuredGridReader from python?

Michael Lampe Michael.Lampe at gcsc.uni-frankfurt.de
Mon Oct 12 19:26:08 EDT 2009


Thanks a lot!

-Michael

Quoting Berk Geveci <berk.geveci at kitware.com>:

> Try XMLPartitionedUnstructuredGridReader. To get a full list of
> classes in paraview.simple, try
>
> import paraview.simple
> help(paraview.simple)
>
> -berk
>
> On Mon, Oct 12, 2009 at 1:07 PM, Michael Lampe
> <Michael.Lampe at gcsc.uni-frankfurt.de> wrote:
>> Dear all,
>>
>> I'm trying to use the following script to convert some files:
>>
>> -----
>>
>> from paraview.simple import *
>>
>> for index in range(0,159):
>>    r = XMLPUnstructuredGridReader()   <<---
>>    w = DataSetWriter()
>>    w.Input = r
>>    w.FileType = 'Ascii'
>>    r.FileName = "elder.%04d.pvtu" % index
>>    w.FileName = "elder.%04d.vtk" % index
>>    w.UpdatePipeline()
>>
>> -----
>>
>> The same script works fine with 'XMLUnstructuredGridReader' (without the
>> 'P'), but with 'XMLPUnstructuredGridReader' (including the 'P') I get:
>>
>> NameError: name 'XMLPUnstructuredGridReader' is not defined
>>
>> Using 'r = servermanager.sources.XMLPUnstructuredGridReader()'
>>
>> AttributeError: 'PVModule' object has no attribute
>> 'XMLPUnstructuredGridReader'
>>
>> but 'dir(servermanager.sources)' lists 'XMLPUnstructuredGridReader'.
>>
>> This is with paraview 3.6.1.
>>
>> Any hint what I'm doing wrong?
>>
>> Thanks,
>>  Michael
>>
>>
>> _______________________________________________
>> 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
>>
>
>





More information about the ParaView mailing list