[Paraview] Export X3D Files via Python >version 3.8

Andrea Beck beck at iag.uni-stuttgart.de
Thu May 10 12:31:52 EDT 2012


Thanks a lot, Sebastian!
That did the trick. The only thing I had change was the line marked 
below, or I got the error message:

Traceback (most recent call last):
   File "<string>", line 5, in <module>
   File 
"/home/ParaView-3.14.1-Linux-64bit/lib/paraview-3.14/site-packages/paraview/simple.py", 
line 249, in Show
     raise RuntimeError, "Could not create a representation object for 
proxy %s" % proxy.GetXMLLabel()
RuntimeError: Could not create a representation object for proxy RenderView

Otherwise, it worked fine. Thank you very much. BTW, is there a good 
reference for the API somewhere? All the stuff I could find online was 
either outdated or incomplete.

All the best,
Andrea


On 05/10/2012 03:47 PM, Sebastien Jourdain wrote:
> from paraview.simple import *
> exporters=servermanager.createModule("exporters")
> source=Cone()
> view = GetActiveView()
> Show(view)    #<=============  Change this to Show()
> render=Render()
> x3dExporter=exporters.X3DExporter(FileName="foo.x3d")
> x3dExporter.SetView(view) #<===== NEW LINE
> x3dExporter.Write()



More information about the ParaView mailing list