# Write sources / datasets used in a glance file

**URL:** https://discourse.paraview.org/t/write-sources-datasets-used-in-a-glance-file/6244
**Category:** Web Support
**Created:** [January 17, 2021, 3:39am UTC](https://discourse.paraview.org/t/write-sources-datasets-used-in-a-glance-file/6244 "2021-01-17T03:39:06Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![devngc](https://discourse.paraview.org/user_avatar/discourse.paraview.org/devngc/32/5514_2.png) [@devngc](https://discourse.paraview.org/u/devngc)
#### Post date: [January 17, 2021, 3:39am UTC](https://discourse.paraview.org/t/write-sources-datasets-used-in-a-glance-file/6244/1 "2021-01-17T03:39:06Z")

</div>

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](https://github.com/Kitware/vtk-js/tree/master/Utilities/DataGenerator) and [this](https://github.com/Kitware/vtk-js/tree/master/Utilities/ParaView). 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.

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [January 17, 2021, 5:05pm UTC](https://discourse.paraview.org/t/write-sources-datasets-used-in-a-glance-file/6244/2 "2021-01-17T17:05:10Z")

</div>

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](https://kitware.github.io/paraview-glance/doc/loading_files.html#Automatic-Remote-File-Loading-via-URL) 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.

---

<div class="post-metadata">

### Author: ![devngc](https://discourse.paraview.org/user_avatar/discourse.paraview.org/devngc/32/5514_2.png) [@devngc](https://discourse.paraview.org/u/devngc)
#### Post date: [January 17, 2021, 7:29pm UTC](https://discourse.paraview.org/t/write-sources-datasets-used-in-a-glance-file/6244/3 "2021-01-17T19:29:37Z")

</div>

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

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [January 18, 2021, 4:21pm UTC](https://discourse.paraview.org/t/write-sources-datasets-used-in-a-glance-file/6244/4 "2021-01-18T16:21:20Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![devngc](https://discourse.paraview.org/user_avatar/discourse.paraview.org/devngc/32/5514_2.png) [@devngc](https://discourse.paraview.org/u/devngc)
#### Post date: [January 24, 2021, 7:40pm UTC](https://discourse.paraview.org/t/write-sources-datasets-used-in-a-glance-file/6244/5 "2021-01-24T19:40:49Z")

</div>

Hi @jourdain, thank you again for helping me. You may want to check [this](https://github.com/ladybug-tools/honeybee-vtk#honeybee-vtk) 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?

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [January 24, 2021, 10:59pm UTC](https://discourse.paraview.org/t/write-sources-datasets-used-in-a-glance-file/6244/6 "2021-01-24T22:59:53Z")

</div>

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.
