# Automatically load data into ParaView Glance?

**URL:** https://discourse.paraview.org/t/automatically-load-data-into-paraview-glance/1539
**Category:** Web Support
**Created:** [March 27, 2019, 12:10pm UTC](https://discourse.paraview.org/t/automatically-load-data-into-paraview-glance/1539 "2019-03-27T12:10:41Z")
**Posts on this page:** 20
**Page:** 2

<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: [March 16, 2020, 10:07am UTC](https://discourse.paraview.org/t/automatically-load-data-into-paraview-glance/1539/21 "2020-03-16T10:07:07Z")

</div>

Hi Sharon,

ParaViewWeb can indeed load files at startup. For that you need to add the extra argument `--load-file can.ex2`. You can even automate that process with the launcher so the client can provide which file should be loaded on the server side.

---

<div class="post-metadata">

### Author: ![sharon](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://discourse.paraview.org/u/sharon)
#### Post date: [March 16, 2020, 10:56am UTC](https://discourse.paraview.org/t/automatically-load-data-into-paraview-glance/1539/22 "2020-03-16T10:56:15Z")

</div>

Thank you Seb for your reply!

Best Regards,  
Sharon

---

<div class="post-metadata">

### Author: ![johans](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/3ab097/32.png) [@johans](https://discourse.paraview.org/u/johans)
#### Post date: [April 7, 2020, 6:06am UTC](https://discourse.paraview.org/t/automatically-load-data-into-paraview-glance/1539/23 "2020-04-07T06:06:22Z")

</div>

I have automatically setup Glance to load a vtp (ascii) file on startup. Is it possible to select/show the first (or any) of the defined data fields on open (as per default the “Color By” field is set to white solid color and not the first available data field)?

---

<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: [April 7, 2020, 9:20am UTC](https://discourse.paraview.org/t/automatically-load-data-into-paraview-glance/1539/24 "2020-04-07T09:20:57Z")

</div>

A \*.glance file can help you define any UI settings and point to external file such as vtp dataset…

---

<div class="post-metadata">

### Author: ![dragikamov](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dragikamov/32/3589_2.png) [@dragikamov](https://discourse.paraview.org/u/dragikamov)
#### Post date: [April 25, 2020, 9:25pm UTC](https://discourse.paraview.org/t/automatically-load-data-into-paraview-glance/1539/25 "2020-04-25T21:25:32Z")

</div>

Hello Sebastien,

I have a question of whether it is possible after the server is already launched to somehow using the command prompt or something else to command the visualizer to load another file without shutting down the server and adding that extra argument `--load-file can.ex2`

Thank you in advance.  
Sincerely,  
Dragi

---

<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: [April 26, 2020, 2:16pm UTC](https://discourse.paraview.org/t/automatically-load-data-into-paraview-glance/1539/26 "2020-04-26T14:16:43Z")

</div>

You could add more arguments and process them yourself to load more files. But otherwise, you could let the client tell the server to load more files…

In both case, you will need to edit some code.

---

<div class="post-metadata">

### Author: ![bilke](https://discourse.paraview.org/user_avatar/discourse.paraview.org/bilke/32/1003_2.png) [@bilke](https://discourse.paraview.org/u/bilke)
#### Post date: [January 8, 2021, 10:05pm UTC](https://discourse.paraview.org/t/automatically-load-data-into-paraview-glance/1539/27 "2021-01-08T22:05:26Z")

</div>

I am trying to locally host ParaView Glance and automatically load a local file. My web server root contains:

- ParaViewGlance.html
- scene.vtkjs

When I load this via

```auto
http://localhost:8000/ParaViewGlance.html?name=foo&url=/scene.vtkjs

```

It does not load my local data but shows the browse (data) dialog and I get the following errors:

```auto
ParaViewGlance.html?name=foo&url=/scene.vtkjs:22680 GET http://localhost:8000/glance-external-ITKReader.bddfe222bdf344dd54cd.js net::ERR_ABORTED 404 (File not found)
ParaViewGlance.html?name=foo&url=/scene.vtkjs:22682 GET http://localhost:8000/glance-external-Workbox.9633edaa519493db2499.js net::ERR_ABORTED 404 (File not found)

```

When I open this file via the browse-dialog it works just fine. What is `glance-external-ITKReader` and `glance-external-Workbox`?

Any help is highly appreciated!  
Thanks,  
Lars

---

<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 8, 2021, 10:44pm UTC](https://discourse.paraview.org/t/automatically-load-data-into-paraview-glance/1539/28 "2021-01-08T22:44:12Z")

</div>

Try `http://localhost:8000/ParaViewGlance.html?name=foo.vtkjs&url=/scene.vtkjs`.

The standalone HTML does not bundle the ITK which is fine for your case, but the `name` needs to have the extension so the mapping to the proper reader can happen. Because the assumption is that the `url` could be just `/data/sfgi76swdiufyo7wd` with not a proper name for that file.

---

<div class="post-metadata">

### Author: ![bilke](https://discourse.paraview.org/user_avatar/discourse.paraview.org/bilke/32/1003_2.png) [@bilke](https://discourse.paraview.org/u/bilke)
#### Post date: [January 9, 2021, 9:07am UTC](https://discourse.paraview.org/t/automatically-load-data-into-paraview-glance/1539/29 "2021-01-09T09:07:39Z")

</div>

Thanks a lot Sebastien, adding the file extension to the name did the trick!

---

<div class="post-metadata">

### Author: ![Sohail\_B](https://discourse.paraview.org/user_avatar/discourse.paraview.org/sohail_b/32/5671_2.png) [@Sohail\_B](https://discourse.paraview.org/u/Sohail_B)
#### Post date: [February 9, 2021, 10:51am UTC](https://discourse.paraview.org/t/automatically-load-data-into-paraview-glance/1539/30 "2021-02-09T10:51:50Z")

</div>

Hi there,

Is there a way to load files using ajax calls? like if first url was something like:

http:localhost:9999/?name=Indian\_Hill.stl&url=http://localhost:9999/cfm\_data/Indian\_Hill.stl

Then it updates to this

http:localhost:9999/?name=[Indian\_Hill.stl,Indian\_Hill.stl]&url=[[http://localhost:9999/cfm\_data/Indian\_Hill.stl,http://localhost:9999/cfm\_data/Indian\_Hill.stl](http://localhost:9999/cfm_data/Indian_Hill.stl,http://localhost:9999/cfm_data/Indian_Hill.stl)]

And so on and this url changes after regular time intervals.

Kindly guide me!

Thanks!

---

<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: [February 9, 2021, 3:20pm UTC](https://discourse.paraview.org/t/automatically-load-data-into-paraview-glance/1539/31 "2021-02-09T15:20:16Z")

</div>

You can load your own script (edit the index.html) that will use the global API to load/read data that you fetch at a given interval. Assuming I understood your question.

---

<div class="post-metadata">

### Author: ![Sohail\_B](https://discourse.paraview.org/user_avatar/discourse.paraview.org/sohail_b/32/5671_2.png) [@Sohail\_B](https://discourse.paraview.org/u/Sohail_B)
#### Post date: [February 9, 2021, 3:28pm UTC](https://discourse.paraview.org/t/automatically-load-data-into-paraview-glance/1539/32 "2021-02-09T15:28:54Z")

</div>

I did exactly the same to fetch a list of .vtp files placed at a remote server.

Actually I want to do a little different.

Suppose a basic url is there with one name and one url and then after 5 or 10 seconds new .vtp files is loaded with old file still there and it continues to do this until the last file.

Hope I explained it clearly .

Thanks

---

<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: [February 9, 2021, 3:39pm UTC](https://discourse.paraview.org/t/automatically-load-data-into-paraview-glance/1539/33 "2021-02-09T15:39:34Z")

</div>

Ok, then what I said match exactly what you need.

---

<div class="post-metadata">

### Author: ![Sohail\_B](https://discourse.paraview.org/user_avatar/discourse.paraview.org/sohail_b/32/5671_2.png) [@Sohail\_B](https://discourse.paraview.org/u/Sohail_B)
#### Post date: [February 9, 2021, 3:45pm UTC](https://discourse.paraview.org/t/automatically-load-data-into-paraview-glance/1539/34 "2021-02-09T15:45:57Z")

</div>

To some extent yes! in fact 50% of it. Second part is to figure out how to put those list of files in the form of a proper url with few seconds of delays.

---

<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: [February 9, 2021, 3:56pm UTC](https://discourse.paraview.org/t/automatically-load-data-into-paraview-glance/1539/35 "2021-02-09T15:56:36Z")

</div>

I’m not talking about URL. If you use the URL, you won’t be able to properly incrementally load dataset.

---

<div class="post-metadata">

### Author: ![Sohail\_B](https://discourse.paraview.org/user_avatar/discourse.paraview.org/sohail_b/32/5671_2.png) [@Sohail\_B](https://discourse.paraview.org/u/Sohail_B)
#### Post date: [February 9, 2021, 4:00pm UTC](https://discourse.paraview.org/t/automatically-load-data-into-paraview-glance/1539/36 "2021-02-09T16:00:57Z")

</div>

Thank you for your help! I think I have got it!

Many thanks!

---

<div class="post-metadata">

### Author: ![Sohail\_B](https://discourse.paraview.org/user_avatar/discourse.paraview.org/sohail_b/32/5671_2.png) [@Sohail\_B](https://discourse.paraview.org/u/Sohail_B)
#### Post date: [February 14, 2021, 8:04am UTC](https://discourse.paraview.org/t/automatically-load-data-into-paraview-glance/1539/37 "2021-02-14T08:04:33Z")

</div>

Hi there,

I have another questions please. How can I used how to use node fs module in paraview glance to read and write json files?

Please guide me .

Thanks!

---

<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: [February 15, 2021, 4:23pm UTC](https://discourse.paraview.org/t/automatically-load-data-into-paraview-glance/1539/38 "2021-02-15T16:23:48Z")

</div>

I don’t understand the question as Glance does not work with node but in your browser. Also what JSON are you talking about?

---

<div class="post-metadata">

### Author: ![Sohail\_B](https://discourse.paraview.org/user_avatar/discourse.paraview.org/sohail_b/32/5671_2.png) [@Sohail\_B](https://discourse.paraview.org/u/Sohail_B)
#### Post date: [March 25, 2021, 5:40am UTC](https://discourse.paraview.org/t/automatically-load-data-into-paraview-glance/1539/39 "2021-03-25T05:40:46Z")

</div>

Hi there,

I have done that thanks for your help.

Now I have another riddle to solve, how can I add a login authentication before someone opens up that landing page of preview glance?

You help is much appreciated as always!

Best Regards

---

<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: [March 25, 2021, 2:44pm UTC](https://discourse.paraview.org/t/automatically-load-data-into-paraview-glance/1539/40 "2021-03-25T14:44:10Z")

</div>

You have several way of doing so, but one is to enable it via your web server (i.e. Apache).

[Previous page](https://discourse.paraview.org/t/automatically-load-data-into-paraview-glance/1539.md?page=1)

[Next page](https://discourse.paraview.org/t/automatically-load-data-into-paraview-glance/1539.md?page=3)
