[Paraview] 'UnstructuredGridReader' is not defined

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Fri Feb 14 09:48:19 EST 2014


Try using OpenDataFile
(http://www.paraview.org/ParaView3/Doc/Nightly/www/py-doc/paraview.simple.html#paraview.simple.OpenDataFile).
Does that work?

Utkarsh

On Fri, Feb 14, 2014 at 7:33 AM, David López <dysmarbella at gmail.com> wrote:
> Hello, i´m trying to open a vtu file via python:
>
> try: paraview.simple
> except: from paraview.simple import *
> import sys
> path = "c:/temp/prueba/"
> fichero_vtu = 'groupvtu_1.vtu'
>
> sys.path.append(path)
> paraview.simple._DisableFirstRenderCameraReset()
> GRUPO_vtu = XMLUnstructuredGridReader( FileName=[path + fichero_vtu] )
> GRUPO_vtu.PointArrayStatus = []
> GRUPO_vtu.CellArrayStatus = []
> GRUPO_VTU = GetActiveSource()
> RenameSource("MODEL", GRUPO_vtu)
> MODEL = GRUPO_VTU
> del GRUPO_VTU
> Render()
>
> This Works fine in Paraview 3.98.1 but y get this error on Paraview 4.0.1
>  File "<string>", line 12, in <module>
>
> NameError: name 'UnstructuredGridReader' is not defined
>
>
> I need help, thanks.
>
> _______________________________________________
> 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