[Paraview] Loading XML configuration file from pvpython

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Wed Oct 26 08:37:34 EDT 2016


Tim,

`LoadXMLConfiguration` is intended to parse xml text itself, not a file
name. You should be able to use the `simple.LoadPlugin` for xml plugins
instead, as follows:

> from paraview.simple import *
> LoadPlugin("../my_plugin.xml", False, globals())


Utkarsh

On Tue, Oct 25, 2016 at 1:43 PM, Gallagher, Timothy P <
tim.gallagher at gatech.edu> wrote:

> Hello,
>
>
> I have a programmable filter that is wrapped into a custom plugin using an
> XML configuration file. If I use the GUI and go to the Manage Plugins and
> load it, everything is fine.
>
>
> However, I can't figure out how to load it inside pvpython. I am trying to
> do:
>
>
> servermanager.ProxyManager().LoadConfigurationXML("/path/
> to/my_plugin.xml")
> servermanager.updateModules(servermanager)
>
> but that gives me:
>
> ERROR: In ParaView/VTK/IO/XMLParser/vtkXMLParser.cxx, line 483
> vtkPVXMLParser (0x2cb9b80): Error parsing XML in stream at line 1, column
> 0, byte index 0: not well-formed (invalid token)
>
> I looked through the header files and the C++ classes have a
> LoadConfigurationXML, which takes a vtkPVXMLElement, and a
> LoadConfigurationXMLFromString which takes a const char pointer. I can call
> the former, but the latter does not seem to be exposed through the python
> interface.
>
> Is it not possible to pass the file name in as the argument here like it
> is with LoadCustomProxyDefinitions()? Is there something I'm missing?
>
> Thanks,
>
> Tim
>
>
> _______________________________________________
> 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/20161026/34293aa1/attachment.html>


More information about the ParaView mailing list