Autoload Plugin from python script

Dear everyone,

I am trying to load the SurfaceLIC plugin from a python script so that when I start paraview with that script the plugin is already loaded and ready to use. Opening paraview a first time, ticking “autoload plugin” in the gui and then reopening using my script works, but I was looking for a way to do that automatically in the script.

For now I tried with:

LoadPlugin("SurfaceLIC", True, globals())

Placed at the start of the script that is executed by paraview.
And every combination I could think of sudden command, even giving it the path to my local SurfaceLIC.dll file as used here. but none of that did load the plugin on start

What would be the correct way to do it?

Thanks in advance

This should work.

It needs then to be a problem lied to my specific configuration, if it can help I have paraview installed to a shared folder on a server and it is run from that folder, so that not everyone that uses it has to install paraview to his machine.

Probably then compiling with the appropriate flag for autoloading the plugin is the only other option

Would it be possible as a solution to save the autoload settings in a configuration file and have them read when paraview starts so that it autoloads?

Put your plugin in folder bin/paraview-5.VER/plugins/
and modify file bin/paraview-5.VER/plugins/paraview.plugins.xml, add plugin item:
<plugin name="XXXplugin" auto_load="1">
then paraview will auto load XXXplugin on startup.

1 Like

This worked brilliantly, I can’t thank you enough