# Access a Vision Window from Perspective?

**URL:** <https://forum.inductiveautomation.com/t/access-a-vision-window-from-perspective/52793>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [November 5, 2021, 7:14pm UTC](https://forum.inductiveautomation.com/t/access-a-vision-window-from-perspective/52793 "2021-11-05T19:14:36Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brit](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@Brit](https://forum.inductiveautomation.com/u/Brit)\
**Post date:** [November 5, 2021, 7:14pm UTC](https://forum.inductiveautomation.com/t/access-a-vision-window-from-perspective/52793/1 "2021-11-05T19:14:36Z")

</div>

Hi, is there any way to access a Vision Window or client scripts from a Perspective View on the same project?

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 5, 2021, 9:23pm UTC](https://forum.inductiveautomation.com/t/access-a-vision-window-from-perspective/52793/2 "2021-11-05T21:23:33Z")

</div>

Nope, they’re completely independent. However you can run a perspective session inside of Vision using the Web browser component. You still have no methods for them to talk to each other though

---

<div class="post-metadata">

**Author:** ![Brit](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@Brit](https://forum.inductiveautomation.com/u/Brit)\
**Post date:** [November 5, 2021, 9:27pm UTC](https://forum.inductiveautomation.com/t/access-a-vision-window-from-perspective/52793/3 "2021-11-05T21:27:27Z")

</div>

Okay, I figured so. I tried the Web Browser, but the Starting URL doesn’t seem to load. It just shows a white, blank screen. Any thoughts on why that might be? Thanks for the response by the way!

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 6, 2021, 1:01am UTC](https://forum.inductiveautomation.com/t/access-a-vision-window-from-perspective/52793/4 "2021-11-06T01:01:34Z")

</div>

What url are you using?

---

<div class="post-metadata">

**Author:** ![Brit](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@Brit](https://forum.inductiveautomation.com/u/Brit)\
**Post date:** [November 8, 2021, 2:03pm UTC](https://forum.inductiveautomation.com/t/access-a-vision-window-from-perspective/52793/5 "2021-11-08T14:03:17Z")

</div>

I was using a Perspective URL, but that wasn’t working so I tried just [https://www.google.com/](https://www.google.com/) and unfortunately couldn’t get that to work either. I am using this on a RPi 4, so it’s possible that could be causing some issues?

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [November 8, 2021, 2:06pm UTC](https://forum.inductiveautomation.com/t/access-a-vision-window-from-perspective/52793/6 "2021-11-08T14:06:28Z")

</div>

you can let them talk with messages, if you provide some vision props(user, client id) through the url with “:params”, its not very practical/save though…

[https://docs.inductiveautomation.com/display/DOC81/system.util.sendMessage](https://docs.inductiveautomation.com/display/DOC81/system.util.sendMessage)

@Brit for the url you should use the correct ip and not ‘localhost’ for testing

---

<div class="post-metadata">

**Author:** ![Brit](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@Brit](https://forum.inductiveautomation.com/u/Brit)\
**Post date:** [November 8, 2021, 2:25pm UTC](https://forum.inductiveautomation.com/t/access-a-vision-window-from-perspective/52793/7 "2021-11-08T14:25:52Z")

</div>

I’ll check out the system.util.sendMessage, thanks! As for the correct ip and not ‘localhost’, what do you mean by that?

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [November 8, 2021, 2:32pm UTC](https://forum.inductiveautomation.com/t/access-a-vision-window-from-perspective/52793/8 "2021-11-08T14:32:30Z")

</div>

configure the starting url like this:  
ofc with the right ip, port , project ect  
`http://172.16.13.4:8020/data/perspective/client/Project/view`

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [November 8, 2021, 2:39pm UTC](https://forum.inductiveautomation.com/t/access-a-vision-window-from-perspective/52793/9 "2021-11-08T14:39:03Z")

</div>

to add in the params to easily send messages you will have to use a binding and a script in an expression

`'http://172.16.13.4:8020/data/perspective/client/Project/view/'+ runScript('projectScriptLocation.getConfigs()')`

this projectScriptLocation.getConfigs should return “clientId” (system.util.getClientId()) and maybe window or page or something (extra params seperated by /)  
then you will have to change the url in perspective to pass in these params  
[https://docs.inductiveautomation.com/display/DOC81/Pages+in+Perspective](https://docs.inductiveautomation.com/display/DOC81/Pages+in+Perspective)  
[https://inductiveuniversity.com/videos/passing-parameters-to-pages/8.0/8.1](https://inductiveuniversity.com/videos/passing-parameters-to-pages/8.0/8.1)  
So you can use them in system.util.sendMessage() becuase if you dont add in (atleast) a client id it will send to all clients, (which is probably not what you want)

Doing it like this i was able to send a message on a perspective button click to open a popup in vision, idk if this is the best way xd

---

<div class="post-metadata">

**Author:** ![Brit](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@Brit](https://forum.inductiveautomation.com/u/Brit)\
**Post date:** [November 8, 2021, 4:16pm UTC](https://forum.inductiveautomation.com/t/access-a-vision-window-from-perspective/52793/10 "2021-11-08T16:16:28Z")

</div>

Would you mind sharing a little bit of how you configured your scripts to open a popup? No worries if not! Most of this is fairly new to me and while the document pages are helpful, I’m still struggling with how to go about this. The binding and script in an expression makes perfect sense and I understand how to get the Client ID, but I get lost on the sendMessage part

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [November 8, 2021, 4:18pm UTC](https://forum.inductiveautomation.com/t/access-a-vision-window-from-perspective/52793/11 "2021-11-08T16:18:28Z")

</div>

Lets back up a step, what exactly is it you are trying to accomplish? Someone does something in perspective (what action?) and that’ is supposed to cause what sort of change in the vision window?

---

<div class="post-metadata">

**Author:** ![Brit](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@Brit](https://forum.inductiveautomation.com/u/Brit)\
**Post date:** [November 8, 2021, 4:31pm UTC](https://forum.inductiveautomation.com/t/access-a-vision-window-from-perspective/52793/12 "2021-11-08T16:31:06Z")

</div>

Basically I want a vision popup window to be open at all times on a perspective project. There is a button in Perspective that someone presses. This button writes a “1” to a boolean tag which is tied to a toggle button in the Vision window. When the toggle button is true, it will run a script that writes a 1 to a GPIO pin on a RPi. When it is false, it will run that same script to write a 0 to the pin. I have a project in Vision that works great with this, but we’re wanting to use Perspective for this project and need to be able to write to the GPIO pins on the pi. Which can’t be done with just Perspective from what I’ve seen.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 8, 2021, 5:02pm UTC](https://forum.inductiveautomation.com/t/access-a-vision-window-from-perspective/52793/13 "2021-11-08T17:02:06Z")

</div>

If you know anything about Java, you could give this a try:

> **[GitHub - paul-griffith/dio-zero-ignition](https://github.com/paul-griffith/dio-zero-ignition)**
>
> Contribute to paul-griffith/dio-zero-ignition development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![IngLovac](https://avatars.discourse-cdn.com/v4/letter/i/a587f6/32.png) [@IngLovac](https://forum.inductiveautomation.com/u/IngLovac)\
**Post date:** [November 8, 2022, 8:34pm UTC](https://forum.inductiveautomation.com/t/access-a-vision-window-from-perspective/52793/14 "2022-11-08T20:34:20Z")

</div>

Hello!  
I want to do the same thing, be able to launch the Vision Client Launcher and run an application from there, all that by pressing a button in Perspective. Have you be able to do that or somebody from here?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 8, 2022, 8:39pm UTC](https://forum.inductiveautomation.com/t/access-a-vision-window-from-perspective/52793/15 "2022-11-08T20:39:04Z")

</div>

You cannot. Browsers cannot open arbitrary executables reliably. At most, you could register a protocol handler (individually, on every machine you control) and 'deep-link' from Perspective into Vision.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 8, 2022, 10:28pm UTC](https://forum.inductiveautomation.com/t/access-a-vision-window-from-perspective/52793/16 "2022-11-08T22:28:46Z")

</div>

A Vision Client can run an external browser to open a Perspective, and in most environments, can use the Web Browser module to run Perspective inside Vision. Vision can also directly access files in the local file system, access local devices, access unique local device identifiers, make any kind of network connection to any reachable target system, and run other arbitrary executables.

Perspective can do none of this, and as a browser UI, it should never be expected. (Though there is hope for some of it, in the future, in Perspective Workstation.)

How did you decide to use Perspective over Vision, with requirements like this?

---

<div class="post-metadata">

**Author:** ![tyler.robertson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tyler.robertson/32/18299_2.png) [@tyler.robertson](https://forum.inductiveautomation.com/u/tyler.robertson)\
**Post date:** [October 1, 2024, 12:41am UTC](https://forum.inductiveautomation.com/t/access-a-vision-window-from-perspective/52793/17 "2024-10-01T00:41:20Z")

</div>

Found this thread while looking to do something else. Can't message handlers do this? I'm able to send messages from a perspective project on an edge device to a vision client running on the gateway, which then does some local processing for me, and it works great. I'm struggling to see a downside with it

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [October 4, 2024, 6:36am UTC](https://forum.inductiveautomation.com/t/access-a-vision-window-from-perspective/52793/18 "2024-10-04T06:36:43Z")

</div>

Local refers to the clients computer, not the gateway.

---

<div class="post-metadata">

**Author:** ![tyler.robertson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tyler.robertson/32/18299_2.png) [@tyler.robertson](https://forum.inductiveautomation.com/u/tyler.robertson)\
**Post date:** [October 4, 2024, 3:16pm UTC](https://forum.inductiveautomation.com/t/access-a-vision-window-from-perspective/52793/19 "2024-10-04T15:16:23Z")

</div>

Yeah sorry - in this example I just happen to be running the vision client _on_ my gateway, but you can scope a message handler to a project/client, to trigger an execution on the local machine

`system.util.sendMessage(project, messageHandler, payload, scope, clientSessionId, user, hasRole, hostName, remoteServers)`

Also see now that you suggested this higher up!

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [October 4, 2024, 4:09pm UTC](https://forum.inductiveautomation.com/t/access-a-vision-window-from-perspective/52793/20 "2024-10-04T16:09:16Z")

</div>

> [@Brit](#):
>
> Basically I want a vision popup window to be open at all times on a perspective project. There is a button in Perspective that someone presses. This button writes a "1" to a boolean tag which is tied to a toggle button in the Vision window. When the toggle button is true, it will run a script that writes a 1 to a GPIO pin on a RPi. When it is false, it will run that same script to write a 0 to the pin. I have a project in Vision that works great with this, but we're wanting to use Perspective for this project and need to be able to write to the GPIO pins on the pi. Which can't be done with just Perspective from what I've seen.

Since someone revived this old thread, I'll give my 2c:

Couldn't you just run parallel vision/perspective projects that launch at the same time (or automatically launch the perspective project from the vision project once it's open) and use gateway tags - which both vision and perspective have access to, since you want the vision popup to be open at all times?
