[Paraview] Export X3D Files via Python >version 3.8

Sebastien Jourdain sebastien.jourdain at kitware.com
Thu May 10 14:22:05 EDT 2012


Hi Andrea,

your question about the python documentation, it is kind of tricky.
For the python API, basically it's the merge of those components:
- src/Utilities/VTKPythonWrapping/paraview/simple.py
- src/Utilities/VTKPythonWrapping/paraview/servermanager.py
- src/ParaViewCore/ServerImplementation/Resources/*.xml
+ some custom proxy which was the case for exporter.

If we could figure out a way to generate something that would be
great. But so far, it is not the case.

Although, from the XML we generate the following documentation (See Appendix):
- http://paraview.org/Wiki/ParaView/Users_Guide/Table_Of_Contents

Seb

On Thu, May 10, 2012 at 12:31 PM, Andrea Beck <beck at iag.uni-stuttgart.de> wrote:
> 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