# Mutli-Monitor to show 4 different Display

**URL:** <https://forum.inductiveautomation.com/t/mutli-monitor-to-show-4-different-display/93034>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [July 10, 2024, 8:14pm UTC](https://forum.inductiveautomation.com/t/mutli-monitor-to-show-4-different-display/93034 "2024-07-10T20:14:20Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [July 10, 2024, 10:20pm UTC](https://forum.inductiveautomation.com/t/mutli-monitor-to-show-4-different-display/93034/3 "2024-07-10T22:20:45Z")

</div>

If this is a continuation of the question you asked here:

> [@On Client Startup Open previous windows Multi Monitor](https://forum.inductiveautomation.com/t/on-client-startup-open-previous-windows-multi-monitor/92981):
>
> Im trying to set up Multi Monitor and would like to open up screen that is previously open before exit or shutdown.

You'll need to read in the tag values then use that array to open the last displays:

```python
windowList = system.tag.readBlocking(['OpenedWindows'])[0].value

```

So your code would look something like this (replace the AMINE/AMINE GAS TRAIN windows with what ever default window you want on all monitors or use a mix of this and what @leonardo.godoi posted if you want different defaults per desktop - I usually just set them all the same since we're restoring last used and the default only matters the first time the client is ran):

```python
# Get the screen information for all of your monitors.
screensDataset = system.gui.getScreens()

# Retrieve our previously opened windows
windowList = system.tag.readBlocking(['OpenedWindows'])[0].value
  
# Open the first window of the project in the (current) primary monitor.
screenIndex = screensDataset[0][0]
monitorNum = screenIndex + 1
primaryScreenText = 'This is Monitor %d' %monitorNum

windowToOpen = windowList[0] if len(windowList[0]) > 0 else 'AMINE/AMINE GAS TRAIN'
system.nav.swapTo(windowToOpen, {'Display':primaryScreenText})

# Step through all of the screen information, starting with index 1 instead of 0.
for screenDetails in screensDataset[1:]:
    # unpacks the tuple that is returned for each of the monitors present. Consists of screen index, width, and height of the screen.
    screenIndex, screenWidth, screenHeight = screenDetails
    monitorNum = screenIndex + 1
    screenText = "This is Monitor %d" %monitorNum
	# Open an empty frame on the next monitor.
    # Assign a handle and apply the width/height for the monitor you are opening on
    handleName = "Monitor %d" %monitorNum
    system.gui.openDesktop(screen=screenIndex, handle=handleName, width=screenWidth, height=screenHeight)
  
    # Open the Main Window on this new desktop and pass the parameters needed.
    windowToOpen = windowList[monitorNum] if len(windowList[monitorNum]) > 0 else 'AMINE/AMINE GAS TRAIN'
    system.nav.desktop(handleName).swapTo(windowToOpen,{'Display':screenText})

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/mutli-monitor-to-show-4-different-display/93034)._
