[Paraview] Convert file types with python

Jean Favre jfavre at cscs.ch
Fri Apr 24 17:15:51 EDT 2009



On 24, Apr 2009 07:04 PM, David Doria <daviddoria at gmail.com> wrote:

>I want to open some .ply files and save them as .vtp files in a python
>script.
>
>For reading vtp's, I've used
>reader =
>servermanager.sources.XMLPolyDataReader(FileName=ModelFilename)
>
>I saw there was a vtkPly class, so I tried
>reader = servermanager.sources.PlyFile(FileName=ModelFilename)
>and it says "no attribute PlyFile"


to take the guess work out, you may simply refer to the help using the
dir() command

dir(servermanager.sources)    # will print out all sources, and you will
find what you are looking for under the name

servermanager.sources.PLYreader()






More information about the ParaView mailing list