I have created a desktop app and am exporting simulation data in VTP format compatible with ParaView Glance. Is there an easy way to automatically link the Glance app with the data file so that the end user doesn’t have to “open/load” the data into Glance. I don’t really plan to change, recompile or host my own Glance app, but just automatically add or pre-select the data file?
If your data are available out in the wild, you can provide the information on where to load the data in the url, this also support several files if need be.
Here is an example
Thank you, just the functionality I was looking for.
It does not seem to work with local files or files served with only http, is there possibly some workaround or fix for this?
I have not been able to get this to work with my own data hosted on my own domain, for example
Does the glance app maybe need to be hosted on the same domain as the data?
Yes, exactly. When I try that link, I get this error message in Chrome:
Access to XMLHttpRequest at ‘https://www.featool.com/download/featool-multiphysics-airfoil.glance’ from origin ‘https://kitware.github.io’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
So if you host ParaView Glance, you can either get data from the same domain, or set the policy to allow downloads from your data server.
Thank you, that clears it up, and thanks for making Glance available.
I have a similar question. Suppose that I have a html document with an iframe pointing to ParaView Glance:
<iframe src="https://kitware.github.io/paraview-glance/app" id="iframe"></iframe>
(How) Can I upload data in the html document via using that iframe? Will this have the same restrictions as mentioned above or can I upload local data this way?
Via the URL, you will get the same restriction. But you should be able to host Glance locally if need be as well.
You could also use https://firstname.lastname@example.org/dist/ParaViewGlance.html which may not have the CORS limitation.
Thank you for the fast answer. For me, pointing to
doesn’t work, it just continues to the standard
ParaViewGlance.html. It works for the
url. How would this work?