[Paraview] Syntax Change setting Representations ColorArrayName Property

Jean M. Favre jfavre at cscs.ch
Thu Jun 18 05:29:16 EDT 2009


Tobias Froebel wrote:
> Hello,
> 
> I'm encountering a problem with paraview-cvs and paraview-3.6. The
> following example from the servermanager documentation worked fine for
> me in paraview 3.4
> 


Please read Berk's very nice email on May 25, subject: "ParaView Python
users please read"

Many changes have gone in, and the scripting is now much nicer and user
friendly. You must change your syntax though. It is all nicely
documented here:

http://paraview.org/Wiki/ParaView/Python_Scripting

your new script should be:

from paraview.simple import *
sm=servermanager
sm.Connect()

cone=sm.sources.Cone()
elev=sm.filters.Elevation(Input=cone)

view=sm.CreateRenderView()
rep=sm.CreateRepresentation(elev,view)

lt=sm.rendering.PVLookupTable()
rep.LookupTable=lt
rep.ColorAttributeType='POINT_DATA'
rep.ColorArrayName='Elevation'


More information about the ParaView mailing list