[Paraview] How to access XMLPUnstructuredGridReader from python?
Michael Lampe
Michael.Lampe at gcsc.uni-frankfurt.de
Mon Oct 12 13:07:15 EDT 2009
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
More information about the ParaView
mailing list