[Paraview] Saving VRML/X3D file from python

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Thu Jul 23 08:33:34 EDT 2009


Here's a sample script:

--------------------------
from paraview.simple import *
# create the exporters module since it's not currently created
# by default (adding a BUG for that)
exporters = servermanager.createModule("exporters")
Cone()
Show()
view = Render()
x3dExporter = exporters.X3DExporter(View=view, FileName="/tmp/foo.x3d")
x3dExporter.Write()
--------------------------

Do dir(exporters) to list the available exporters

Utkarsh

On Thu, Jul 23, 2009 at 8:25 AM, M. Nawijn<nawijn at gmail.com> wrote:
> Hello,
>
> I would like to export a Paraview view to VRML/X3D. It works fine
> trough the GUI, however I would like to know if it is possible to do
> it from a Python interpreter. I tried to use the new trace option in
> the python console launched from withing Paraview, but it does not
> show anything. Does this mean the functionality is not available in
> Python?
>
> Kind regards,
>
> Marco
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>


More information about the ParaView mailing list