[Paraview] Python interface: ExportView does not accept parameters

Elias Pipping elias.pipping at fu-berlin.de
Mon Feb 2 10:11:57 EST 2015


Dear list,

I'm trying to export vector graphics through paraview's python
interface(*). To that end, from within paraview, I start a python trace,
use the UI to export to an embedded postscript file (via File->Export
scene), and stop the trace again.
The relevant lines of the trace look something like this:

renderView1 = GetActiveViewOrCreate('RenderView')
ExportView('test.eps', view=renderView1)

Now I can open a python interpreter, paste these lines and get the expected
result. So far, so good.

Now let me retrace the above steps: After selecting a location to save to,
I'm presented with a setting of export options. In the above scenario, I
left everything as-is. I can choose among "rasterize 3d geometry", "draw
background", etc. (the latter is an advanced option).

If I change those options, they're passed to ExportView, yielding a line
like the following in the trace:

ExportView('test.eps', view=renderView1, Drawbackground=0,
Rasterize3Dgeometry=0)

While saving from the UI continues to work even in this case, running the
above from within the python interpreter does not. Here's what I get:

File
"[..]/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/site-packages/paraview/simple.py",
line 1350, in ExportView
SetProperties(proxy, **params)
File
"[..]/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/site-packages/paraview/simple.py",
line 449, in SetProperties
raise AttributeError("object has no property %s" % param)
AttributeError: object has no property Drawbackground

Neither the field Drawbackground nor Rasterize3Dgeometry is recognised.

Is the python interface currently incomplete in this respect? Is this
easily fixed or is there a workaround for this issue?


Best regards,

Elias Pipping

(*) All of this concerns a paraview 4.3.1 binary for linux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150202/8f922b07/attachment.html>


More information about the ParaView mailing list