[Paraview] Bug with the trace tool : Exporting view instruction not repeatable

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Wed Jul 22 16:06:34 EDT 2015


Silvère,

There was a bug in the code that traced it where it picked up an
incorrect property name. As a workaround, you can change the
"Rasterize3DGeometry" to "Rasterize3Dgeometry" (note the different
case).

e.g.
ExportView('/tmp/sample.pdf', view=renderView1, Rasterize3Dgeometry=0)



On Wed, Jul 22, 2015 at 11:04 AM, Silvere Pierre
<silvere.pierre.paraview at gmail.com> wrote:
> 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
>
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>


More information about the ParaView mailing list