# Weird question/long shot

**URL:** <https://forum.inductiveautomation.com/t/weird-question-long-shot/107813>\
**Category:** Module Development\
**Tags:** perspective\
**Created:** [June 26, 2025, 3:42am UTC](https://forum.inductiveautomation.com/t/weird-question-long-shot/107813 "2025-06-26T03:42:50Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [June 26, 2025, 3:42am UTC](https://forum.inductiveautomation.com/t/weird-question-long-shot/107813/1 "2025-06-26T03:42:50Z")

</div>

Is there any way for an ignition module to get access to the perspective renderer in an iframe?

XY problem -- i've got view jsons that might be changing pretty rapidly, and I want to see how they'd render in the designer. I don't care about tag values or scripts (or interactivity atm) but i _do_ care about view params for embedded views. (i.e. if i can use a module to translate the view json into JS components, that works too).

---

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [June 26, 2025, 4:14am UTC](https://forum.inductiveautomation.com/t/weird-question-long-shot/107813/2 "2025-06-26T04:14:58Z")

</div>

How about this?

> [@Musson Industrial's Embr-Periscope Module](https://forum.inductiveautomation.com/t/musson-industrials-embr-periscope-module/99047/11):
>
> Json View Component The [latest release of Periscope (0.5.4)](https://github.com/mussonindustrial/embr/releases/tag/%40embr-modules%2Fperiscope%400.5.4) now includes a Json View component. This component allows you to render a view by providing view.json content into the component's properties. play_button Example View JSON But Why? This started as an exercise in trying to understand the full process of view loading. Then, I realized this component was possible and that I already had solved the hardest parts during the development of the Embedded View + component. What Does This Enable? T…

> **[Json View | Musson Industrial](https://docs.mussonindustrial.com/ignition/embr-periscope/components/json-view/)**
>
> This component allows rendering a view from a view.json schema.

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [June 26, 2025, 4:18am UTC](https://forum.inductiveautomation.com/t/weird-question-long-shot/107813/3 "2025-06-26T04:18:42Z")

</div>

hmmm ok so. what i'd do then is....  
set up a webdev route that took a param and set a tag value  
make a single preview page that has this component, binding the view json param to the tag  
Iframe that preview page inside the app?

that should work for everything _except_ embedded views, for which the preview page will need access to the view paths as well. ok ok ok i can start to think about this tho.

(additional background, these view jsons are coming from user input _outside_ the designer. for now they can be basically modeled as 'external scripts creating jsons')

---

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [June 26, 2025, 4:27am UTC](https://forum.inductiveautomation.com/t/weird-question-long-shot/107813/4 "2025-06-26T04:27:28Z")

</div>

I don't 100% follow, but it seems like you've got the pieces you need.

> [@Leor\_Fishman](#):
>
> everything _except_ embedded views,

The `Json View` component will render embedded views just fine, but yeah you need to know the paths ahead of time. You could always write a WebDev endpoint that lists them.

If you run into any issues with the component, post them in the Periscope thread and I'll be happy to help.

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [June 26, 2025, 4:29am UTC](https://forum.inductiveautomation.com/t/weird-question-long-shot/107813/5 "2025-06-26T04:29:23Z")

</div>

my only followup question is here [Filesystem tags?](https://forum.inductiveautomation.com/t/filesystem-tags/107814) so i can just have that view json take the results straight from a file on the machine

---

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [June 26, 2025, 4:42am UTC](https://forum.inductiveautomation.com/t/weird-question-long-shot/107813/6 "2025-06-26T04:42:22Z")

</div>

Perspective is only ever going to have access to the Gateway's filesystem. So if the `view.json` file you want to render is on the Gateway, then yes you could load the file into the Json View component.

If you wanted to do this automatically, you could set up a file watcher that sends messages to the Perspective clients to inform them to reload.

But if the `view.json` is on the Gateway, why don't you just add it to a project?

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [June 26, 2025, 4:43am UTC](https://forum.inductiveautomation.com/t/weird-question-long-shot/107813/7 "2025-06-26T04:43:15Z")

</div>

> [@bmusson](#):
>
> But if the `view.json` is on the Gateway, why don't you just add it to a project?

i don't want to wait the 5m for it to refresh if it's updated on system. (unless that's only for designer, not perspective?)

---

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [June 26, 2025, 4:45am UTC](https://forum.inductiveautomation.com/t/weird-question-long-shot/107813/8 "2025-06-26T04:45:34Z")

</div>

> **[system.project.requestScan | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-project/system-project-requestScan)**
>
> Requests a manual scan of the projects directory in order to refresh projects and their resources.

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [June 26, 2025, 4:49am UTC](https://forum.inductiveautomation.com/t/weird-question-long-shot/107813/9 "2025-06-26T04:49:18Z")

</div>

what would break if i made a perspective session event script that tied this to onpagestartup

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [June 26, 2025, 4:51am UTC](https://forum.inductiveautomation.com/t/weird-question-long-shot/107813/10 "2025-06-26T04:51:08Z")

</div>

i guess it'd just make every page load a bit slower?

---

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [June 26, 2025, 4:52am UTC](https://forum.inductiveautomation.com/t/weird-question-long-shot/107813/11 "2025-06-26T04:52:42Z")

</div>

Nothing, it should work fine. You could also assign it to a button:

1. User clicks button.
2. Call `requestScan`, blocking until completion.
3. After `requestScan` is finished, reload the page.

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [June 26, 2025, 4:53am UTC](https://forum.inductiveautomation.com/t/weird-question-long-shot/107813/12 "2025-06-26T04:53:44Z")

</div>

I don't want this tied to a button, but on page load should be fine.

assuming that if i make the project in question public, the user won't have to relogin to see the rendered views?

---

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [June 26, 2025, 4:59am UTC](https://forum.inductiveautomation.com/t/weird-question-long-shot/107813/13 "2025-06-26T04:59:52Z")

</div>

Running it on page load isn't going to do what you expect; it's not going to delay loading the view until the scan is complete.

Assuming you have another system that is modifying these views, here's what I'd do:

1. External system modifies a `view.json` file.
2. When complete, the external system calls a WebDev endpoint (`/view-updated`) and provides the path of the modified view.
3. When the WebDev endpoint is triggered, it runs `system.project.requestScan`.
4. When the scan is complete, the WebDev endpoint sends a message to all the client's who have the modified view loaded.
5. The client's receive this message and automatically refresh their pages.

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [June 26, 2025, 5:01am UTC](https://forum.inductiveautomation.com/t/weird-question-long-shot/107813/14 "2025-06-26T05:01:19Z")

</div>

will this work if the clients are browsers?

---

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [June 26, 2025, 5:05am UTC](https://forum.inductiveautomation.com/t/weird-question-long-shot/107813/15 "2025-06-26T05:05:00Z")

</div>

Perspective Session = Perspective Session in a tab = Perspective Session in an iFrame = Perspective Session anywhere

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [June 26, 2025, 5:15am UTC](https://forum.inductiveautomation.com/t/weird-question-long-shot/107813/16 "2025-06-26T05:15:05Z")

</div>

would the following flow work?

1. External system modifies a `view.json` file.
2. when a page is loaded, it calls system.project.requestScan in a script via onPageStartup
3. When the scan is complete, the script sends a message to all the client's who have the modified view loaded.
4. The client's receive this message and automatically refresh their pages via message handler
