Visualizer - pass file from html

(Ravid) #1

In 5.2 version, I see you can write such code in index.html:

           application: 'visualizer',
           dataFile: 'a.vtk',
           dataDir: ""

And in this way - to pass a file name from the html to python.
Can I do this in 5.6 v?
Which arguments connect function expect to get?

I do not know if it matters, but I am using in cmd to run visualizer by:

.\bin\pvpython.exe share\paraview-5.6\web\visualizer\server\ --content share\paraview-5.6\web\visualizer\www\ --data “data” --port 8080


(Sebastien Jourdain) #3

The configuration provided in the connect is used by the launcher when starting the application for you dynamically so extra arguments can be provided such as which file should be loaded at startup.

In your case, since you start Visualizer by hand first. That configuration object is useless and will have no affect.

(Ravid) #4

Thanks for your answer.
Now I run Apache httpd.exe, and follow these insructions:

And it run, but it does not respond to the data I send from html, like in the question.
Any help?

By the way, I work with version 5.6, and my launcher.bat file seem so:

set PV_HOME=C:\ParaView-5.6.0
%PV_HOME%\bin\pvpython.exe %PV_HOME%\bin\Lib\site-packages\wslink\ %PV_HOME%\launcher.config

(Sebastien Jourdain) #5

What is the content of your launcher.config?

You can create custom command that will then use your arguments provided in the config object to properly form the command line you intend to.