[Paraview-developers] Changing Display properties using python

Hallock, Kevin Kevin.Hallock at pfizer.com
Mon May 2 13:04:08 EDT 2016


Hi everyone,

I am writing a simple script to create 3D text at a specified location, but I am having trouble figuring out how to apply a translation to it.  Here is my brief code:

from paraview import vtk
string = "Python"
text = paraview.simple.a3DText(Text=string)
paraview.simple.SetDisplayProperties(Opacity=1)
paraview.simple.Show()

Opacity works, but when I use

from paraview import vtk
string = "Python"
text = paraview.simple.a3DText(Text=string)
paraview.simple.SetDisplayProperties(Opacity=1, Translation=[1,1,1])
paraview.simple.Show()


I receive the following error:


Traceback (most recent call last):

File "<string>", line 4, in <module>

File "/Applications/paraview.app/Contents/Python/paraview/simple.py", line 429, in SetDisplayProperties

SetProperties(rep, **params)

File "/Applications/paraview.app/Contents/Python/paraview/simple.py", line 480, in SetProperties

raise AttributeError("object has no property %s" % param)

AttributeError: object has no property Translation

There is some property that allows it to be translated, but I do not know the correct name. Is there a good resource for finding the names of the individual properties so they can be changed in a script?

Thanks,

Kevin

--
Kevin Hallock
Visualization and Modeling, Quantitative Medicine
Neuroscience and Pain Research Unit
Worldwide Research and Development
Pfizer Inc
610 Main Street
Cambridge, MA 02139
Email: kevin.hallock at pfizer.com<mailto:kevin.hallock at pfizer.com>
Fax: 845-474-4001


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20160502/b53f865c/attachment.html>


More information about the Paraview-developers mailing list