Write sources / datasets used in a glance file

Hi All,

Is there an automated way to write either the sources or the datasets found in the glance file? I have a script that can generate either vtk or vtp files. I would like to create either the sources or datasets from these files.

I looked at the vtkjsondatasetwriter class and I don’t think it outputs something that I can put into a glance (state.json) file.

I also looked at this and this. However, I have not been able to figure out how to use Paraview in python. From what I have read so far, it’s complicated.

vtp is great along with a glance file to list where that vtp can be downloaded and what settings should be used for rendering such file properly.

To get an example for that glance file just use the url to point to your vtp in glance and then click on the save button to get that glance file (after your viz setup).

Normally by just looking at that state.json you will see what you need to change in order to achieve your viz.

1 Like

Is it possible to link a file on disk using “file:///” ?

no, but you could inline it in the glance file if need be. It will be text based though at that time.

To see what it looks like, you can load from disk your file and save the glance file.

1 Like

Hi @jourdain, thank you again for helping me. You may want to check this where we added a feature to open our models in a web browser using vtk and vtkjs_helper.

Currently, we are creating arrows in vtk to show normals. I am wondering if there’s a better way. For large models, these arrow make the translation process very slow. Is there a native vtk way to show normals in Paraview Glance?

1 Like

There is a way to use the glyph mapper and just capture the points with a vector and turn that into oriented arrow/cone/else. But that will require some small dev inside glance and vtkjs_helper.