# View windows Application in an Ignition Window

**URL:** <https://forum.inductiveautomation.com/t/view-windows-application-in-an-ignition-window/18344>\
**Category:** Ignition\
**Created:** [June 7, 2018, 2:58pm UTC](https://forum.inductiveautomation.com/t/view-windows-application-in-an-ignition-window/18344 "2018-06-07T14:58:37Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![hajaj.saleh](https://avatars.discourse-cdn.com/v4/letter/h/919ad9/32.png) [@hajaj.saleh](https://forum.inductiveautomation.com/u/hajaj.saleh)\
**Post date:** [June 7, 2018, 2:58pm UTC](https://forum.inductiveautomation.com/t/view-windows-application-in-an-ignition-window/18344/1 "2018-06-07T14:58:37Z")

</div>

Hello All,

I’m trying to find out if there is a way to view an application that is running in the background on the same windows pc as the client. I’ve figured out how to launch external applications but what i want to do is open some sort of a shell from an ignition window to look at that application thats already running in the background.

Thanks !

Ignition 7.9.7

---

<div class="post-metadata">

**Author:** ![bfuson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bfuson/32/4597_2.png) [@bfuson](https://forum.inductiveautomation.com/u/bfuson)\
**Post date:** [June 7, 2018, 7:39pm UTC](https://forum.inductiveautomation.com/t/view-windows-application-in-an-ignition-window/18344/2 "2018-06-07T19:39:43Z")

</div>

Can you be a little more specific as to what you’re trying to accomplish?

Are you trying to somehow render another application’s window inside Ignition?

Are you just trying to view some status about another running process?

---

<div class="post-metadata">

**Author:** ![hajaj.saleh](https://avatars.discourse-cdn.com/v4/letter/h/919ad9/32.png) [@hajaj.saleh](https://forum.inductiveautomation.com/u/hajaj.saleh)\
**Post date:** [June 7, 2018, 7:59pm UTC](https://forum.inductiveautomation.com/t/view-windows-application-in-an-ignition-window/18344/3 "2018-06-07T19:59:56Z")

</div>

so basically I have a cognex camera set up inside the machine. I’m trying to get a live view of the inspection through their software VisionView. The software is installed on the client pc and is on the same network as the camera. Is there a way to show a rendering of VisionView in Ignition?

---

<div class="post-metadata">

**Author:** ![bfuson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bfuson/32/4597_2.png) [@bfuson](https://forum.inductiveautomation.com/u/bfuson)\
**Post date:** [June 7, 2018, 8:08pm UTC](https://forum.inductiveautomation.com/t/view-windows-application-in-an-ignition-window/18344/4 "2018-06-07T20:08:45Z")

</div>

I’m not at all familiar with Cognex or VisionView. Can you get an mjpeg stream directly from the camera’s IP (assuming it has one) or from VisionView?

If so, you can render it in Ignition’s IP Camera Viewer Component.

---

<div class="post-metadata">

**Author:** ![hajaj.saleh](https://avatars.discourse-cdn.com/v4/letter/h/919ad9/32.png) [@hajaj.saleh](https://forum.inductiveautomation.com/u/hajaj.saleh)\
**Post date:** [June 7, 2018, 8:17pm UTC](https://forum.inductiveautomation.com/t/view-windows-application-in-an-ignition-window/18344/5 "2018-06-07T20:17:45Z")

</div>

unfortunately you can’t get an mjpeg. The way VisionView connects to the camera is by using FTP.

---

<div class="post-metadata">

**Author:** ![bfuson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bfuson/32/4597_2.png) [@bfuson](https://forum.inductiveautomation.com/u/bfuson)\
**Post date:** [June 7, 2018, 8:26pm UTC](https://forum.inductiveautomation.com/t/view-windows-application-in-an-ignition-window/18344/6 "2018-06-07T20:26:23Z")

</div>

I assume it receives still images over FTP?

You could try grabbing the files in Ignition and coming up with some way to only render the most recent image.

> [@Python FTP](http://forum.inductiveautomation.com/t/python-ftp/9305/3):
>
> No dice… Traceback (most recent call last): File “event:actionPerformed”, line 10, in IOError: (2, ‘No such file or directory’, ‘\\BRPAAPP001\zebra\bufferclearlable.txt’) Its s Zebra Printer, so they are a bunch of ZPL commands to clear the buffer and then print a label indicating that the buffer is clear…

---

<div class="post-metadata">

**Author:** ![bfuson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bfuson/32/4597_2.png) [@bfuson](https://forum.inductiveautomation.com/u/bfuson)\
**Post date:** [June 7, 2018, 8:28pm UTC](https://forum.inductiveautomation.com/t/view-windows-application-in-an-ignition-window/18344/7 "2018-06-07T20:28:07Z")

</div>

There’s likely a better way though. I’d check the camera’s documentation to see if it exposes an MJPEG or RTSP stream.

---

<div class="post-metadata">

**Author:** ![ethomason](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ethomason/32/43338_2.png) [@ethomason](https://forum.inductiveautomation.com/u/ethomason)\
**Post date:** [June 7, 2018, 10:06pm UTC](https://forum.inductiveautomation.com/t/view-windows-application-in-an-ignition-window/18344/8 "2018-06-07T22:06:26Z")

</div>

> [@bfuson](#):
>
> MJPEG or RTSP stream.

JPEG or MJPEG. RTSP is not supported by the IP Camera Viewer Component.

---

<div class="post-metadata">

**Author:** ![hajaj.saleh](https://avatars.discourse-cdn.com/v4/letter/h/919ad9/32.png) [@hajaj.saleh](https://forum.inductiveautomation.com/u/hajaj.saleh)\
**Post date:** [June 8, 2018, 4:32pm UTC](https://forum.inductiveautomation.com/t/view-windows-application-in-an-ignition-window/18344/9 "2018-06-08T16:32:34Z")

</div>

What if i store images using ftp to a folder in my C drive and then have an image component that has a dynamic file path to somehow always show the most recent image in that file path. is that easy to implement and what kind of script would be required to continuously check for new images in that file path ?

---

<div class="post-metadata">

**Author:** ![bfuson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bfuson/32/4597_2.png) [@bfuson](https://forum.inductiveautomation.com/u/bfuson)\
**Post date:** [June 8, 2018, 5:40pm UTC](https://forum.inductiveautomation.com/t/view-windows-application-in-an-ignition-window/18344/10 "2018-06-08T17:40:29Z")

</div>

That might work. You could put something like this in a gateway timer event script at a rate of every second or so:

```auto
import glob
import os

list_of_files = glob.glob('/path/to/folder/*') # get a list of all files in the folder
latest_file = max(list_of_files, key=os.path.getctime) # filter for only the most recently created file
system.tag.write('latestCameraImagePath', latest_file)

```

Now you have the path to the latest image in the gateway, but you need to get the actual image bytes to the clients. You could either give them access to read the file directly from the gateway (wouldn’t recommend), or have the gateway read in the image bytes and store them in a tag. For the latter approach, you could setup a ValueChange event script on the path tag that populates a byte array tag:

```auto
bytes = system.file.readFileAsBytes(currentValue.value)
system.tag.write(latestCameraImageBytes, bytes)

```

The last step would be to render those bytes in your client window. For that you could attach the following script to a Timer Component on the vision window:

```auto
from javax.swing import ImageIcon

imageComponent = event.source.parent.getComponent("Image")
bytes = system.tag.read(latestCameraImageBytes).value
icon = ImageIcon(bytes)
imageComponent.setIcon(icon)

```

---

<div class="post-metadata">

**Author:** ![hajaj.saleh](https://avatars.discourse-cdn.com/v4/letter/h/919ad9/32.png) [@hajaj.saleh](https://forum.inductiveautomation.com/u/hajaj.saleh)\
**Post date:** [June 8, 2018, 8:21pm UTC](https://forum.inductiveautomation.com/t/view-windows-application-in-an-ignition-window/18344/11 "2018-06-08T20:21:15Z")

</div>

Perfect! Thanks alot
