[Paraview] Problem while exporting views in batch

Silvere Pierre silvere.pierre.paraview at gmail.com
Mon Jul 20 08:32:40 EDT 2015


Hello everyone,

I am used to create vector images (PDF) using the export view tool in the
Paraview 4.3 GUI.
As I wanted to use it in scripts I used Start Trace to get the python
instructions which is :

*ExportView('your_path.pdf', view=your_render_view, Rasterize3DGeometry=0)*

Problem is, the Rasterize3DGeometry option is unknown when you try and use
it in the console (and without it you get a pixeled image).

I looked up old messages and found this piece of code :









*rw = your_render_view.GetRenderWindow()exp =
paraview.vtk.vtkInstantiator.CreateInstance('vtkGL2PSExporter')exp.SetRenderWindow(rw)exp.SetDrawBackground(0)exp.SetSortToSimple()exp.SetFileFormatToPDF()exp.SetFilePrefix("your_path.pdf")exp.Write3DPropsAsRasterImageOff()exp.Write()*

that should take care of it in a less direct way. Unfortunately, the
instanciation fail and the object (named exp here) is undefined.

Is it only an interface problem with python ? Is there any way to get the
correct instance of the renderer ?

Best regards,

Silvère Pierre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150720/f0febf82/attachment.html>


More information about the ParaView mailing list