[Paraview] Pythonscript for listing elements from pipeline in an XML
Scott Wittenburg
scott.wittenburg at kitware.com
Mon Apr 24 18:31:20 EDT 2017
ParaViewWeb has the capability to do most of those things in python. See
here:
https://gitlab.kitware.com/paraview/paraview/blob/master/Web/Python/paraview/web/protocols.py#L1930
for an example of some code which gathers the list of pipeline elements.
Then see here:
https://gitlab.kitware.com/paraview/paraview/blob/master/Web/Python/paraview/web/protocols.py#L1801
for some example code which reads a state file. That protocols.py file has
examples of doing all kinds of things in Python, hopefully it will help you
get where you need to be.
Cheers,
Scott
On Mon, Apr 24, 2017 at 2:41 AM, lisa kauffmann <lisakauffmann at web.de>
wrote:
> Dear ParaViewers,
>
> I've been working with paraview for a while now but I never tried
> scripting with Python.
> Now my question:
> Is there a posibility to list all the names of the elements in my
> paraview-pipeline with a python script and then write the names into an
> XML-file? The thing ist I don't want to open paraview for that: I need a
> function in python that calls my paraview .pvsm-file with all the
> information about my paraview state.
>
> The XML-file should look like that (when i have for example filters used
> in my pipeline):
>
> - <data>
> - <displayer>
> <name>Streamlines</name>
> - </displayer>
> - <displayer>
> <name>Slice</name>
> </data>
>
> Thank You,
>
> namali92
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170424/3ed6a704/attachment.html>
More information about the ParaView
mailing list