# Time Based Screen Rotation Help

**URL:** <https://forum.inductiveautomation.com/t/time-based-screen-rotation-help/104734>\
**Category:** General Discussion\
**Created:** [April 4, 2025, 6:13pm UTC](https://forum.inductiveautomation.com/t/time-based-screen-rotation-help/104734 "2025-04-04T18:13:10Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Douglas\_Mason](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@Douglas\_Mason](https://forum.inductiveautomation.com/u/Douglas_Mason)\
**Post date:** [April 4, 2025, 6:13pm UTC](https://forum.inductiveautomation.com/t/time-based-screen-rotation-help/104734/1 "2025-04-04T18:13:11Z")

</div>

First post here so bear with me. I have found a few topics on this previously and I have used the sample code provided, but I am still having problems with this code not working. I get no errors when I put in the code but it seems like it just does not run the script. The tag value never changes either, it is always a 0. Any help with this would save the rest of my hair from being pulled out of my head. Thanks in advance....V8.1.32

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/2/92eed7f8a47627260ed5249eddcc67459f69d955.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/5/75295ef738c013dc8c6e4c9171a25019c617d76c.png)

---

<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:** [April 4, 2025, 6:21pm UTC](https://forum.inductiveautomation.com/t/time-based-screen-rotation-help/104734/2 "2025-04-04T18:21:38Z")

</div>

The function is `system.nav.swapTo`, not `system.nav.SwapTo` - you're probably getting an error on that line in your local client logs, and the exception is stopping execution before it gets to line 8.

---

<div class="post-metadata">

**Author:** ![Douglas\_Mason](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@Douglas\_Mason](https://forum.inductiveautomation.com/u/Douglas_Mason)\
**Post date:** [April 4, 2025, 6:28pm UTC](https://forum.inductiveautomation.com/t/time-based-screen-rotation-help/104734/3 "2025-04-04T18:28:54Z")

</div>

Thanks for the correction there. I have made the change and still not working. Where can I find the error log that would display this?

---

<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:** [April 4, 2025, 6:33pm UTC](https://forum.inductiveautomation.com/t/time-based-screen-rotation-help/104734/4 "2025-04-04T18:33:07Z")

</div>

It'll be on your running client in the diagnostics. By default, there's an item in the Help menu, but if you've disabled the menu bar in your client you can access it with a shortcut Ctrl + Shift + F7:

> **[Vision Client Interface | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/ignition-modules/vision/vision-client-interface#diagnostics-popup---vision-client-logs)**
>
> Vision Clients, launched in either windowed or fullscreen mode, contain a menubar above the configured project windows. By default, this menubar includes a Command, Windows, and Help menus. To partially or completely hide this menubar, access Project...

---

<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:** [April 4, 2025, 6:42pm UTC](https://forum.inductiveautomation.com/t/time-based-screen-rotation-help/104734/5 "2025-04-04T18:42:17Z")

</div>

You've put `[client]` into all of your window names. That certainly won't work.

---

<div class="post-metadata">

**Author:** ![Douglas\_Mason](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@Douglas\_Mason](https://forum.inductiveautomation.com/u/Douglas_Mason)\
**Post date:** [April 4, 2025, 6:45pm UTC](https://forum.inductiveautomation.com/t/time-based-screen-rotation-help/104734/6 "2025-04-04T18:45:00Z")

</div>

Sorry I am new to the game here. Do I remove [client] from everything in the code or just the Windows lines?

---

<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:** [April 4, 2025, 7:01pm UTC](https://forum.inductiveautomation.com/t/time-based-screen-rotation-help/104734/7 "2025-04-04T19:01:16Z")

</div>

Something like this. Tip: post code [as code](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831), not just a screenshot

```python
tagpath = "[client]Rotation"
windows = ["Windows/ExtrusionNew", "Windows/Ovens"]

x = system.tag.read(tagpath).value % len(windows)

system.nav.swapTo(windows[x])

system.tag.write(tagpath, x + 1)

```

---

<div class="post-metadata">

**Author:** ![Douglas\_Mason](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@Douglas\_Mason](https://forum.inductiveautomation.com/u/Douglas_Mason)\
**Post date:** [April 4, 2025, 7:47pm UTC](https://forum.inductiveautomation.com/t/time-based-screen-rotation-help/104734/8 "2025-04-04T19:47:38Z")

</div>

Tip Noted. Thank you

Now in the log viewer I can see this error.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/d/1d45f3ac81b2f3e1d798286cec9fdb07b1cbd157.png)

---

<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:** [April 4, 2025, 8:04pm UTC](https://forum.inductiveautomation.com/t/time-based-screen-rotation-help/104734/9 "2025-04-04T20:04:15Z")

</div>

Try a capital `C` in `[Client]`.

---

<div class="post-metadata">

**Author:** ![Douglas\_Mason](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@Douglas\_Mason](https://forum.inductiveautomation.com/u/Douglas_Mason)\
**Post date:** [April 4, 2025, 8:12pm UTC](https://forum.inductiveautomation.com/t/time-based-screen-rotation-help/104734/10 "2025-04-04T20:12:51Z")

</div>

With this code

tagpath = "[Client]Rotation"  
windows = ["Windows/ExtrusionNew", "Windows/Ovens", "Windows/Packing"]

x = system.tag.read(tagpath).value % len(windows)

system.nav.swapTo(windows)

system.tag.write(tagpath, x + 1)

Now I get this error

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/e/7ea7fc4a6fdbbfe77a694924b9fba66eb0af4515.png)

---

<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:** [April 4, 2025, 8:18pm UTC](https://forum.inductiveautomation.com/t/time-based-screen-rotation-help/104734/11 "2025-04-04T20:18:04Z")

</div>

Show your Designer tree of window names.

(Have you gone through Inductive University--the free online training? You are experiencing many problems that suggest you haven't.)

---

<div class="post-metadata">

**Author:** ![Douglas\_Mason](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@Douglas\_Mason](https://forum.inductiveautomation.com/u/Douglas_Mason)\
**Post date:** [April 4, 2025, 8:20pm UTC](https://forum.inductiveautomation.com/t/time-based-screen-rotation-help/104734/12 "2025-04-04T20:20:58Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/0/60529786775c8068d99ded00cee580effec396be.png)

I have only done a few. Im just starting with scripting.

---

<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:** [April 4, 2025, 8:37pm UTC](https://forum.inductiveautomation.com/t/time-based-screen-rotation-help/104734/13 "2025-04-04T20:37:30Z")

</div>

Remove `Windows/` from all of your window names. That `Windows` in the tree is the root of all window paths.

---

<div class="post-metadata">

**Author:** ![Douglas\_Mason](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@Douglas\_Mason](https://forum.inductiveautomation.com/u/Douglas_Mason)\
**Post date:** [April 4, 2025, 9:05pm UTC](https://forum.inductiveautomation.com/t/time-based-screen-rotation-help/104734/14 "2025-04-04T21:05:06Z")

</div>

That was it! Thanks for the help and patience.

---

<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:** [April 4, 2025, 10:27pm UTC](https://forum.inductiveautomation.com/t/time-based-screen-rotation-help/104734/15 "2025-04-04T22:27:52Z")

</div>

You can also right click any window or template and copy its path; this is more useful when you end up with actual folders in a more complicated 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:** [April 5, 2025, 12:16pm UTC](https://forum.inductiveautomation.com/t/time-based-screen-rotation-help/104734/16 "2025-04-05T12:16:02Z")

</div>

> [@Douglas\_Mason](#):
>
> system.tag.read(tagpath).value

Also, since this is 8.1.32, you shouldn't use that deprecated function anymore, you should be using `system.tag.readBlocking`, however there's an impotent difference, the new function returns a list not a single BasicQualifiedValue,regardless if you pass in a string or a list of strings. So you need to use `system.tag.readBlocking('...')[0].value`to read the value

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 5, 2025, 1:03pm UTC](https://forum.inductiveautomation.com/t/time-based-screen-rotation-help/104734/17 "2025-04-05T13:03:20Z")

</div>

> [@nminchin](#):
>
> ... however there's an impotent difference ...

I'm intrigued! 🤔

---

<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:** [April 6, 2025, 1:09pm UTC](https://forum.inductiveautomation.com/t/time-based-screen-rotation-help/104734/18 "2025-04-06T13:09:45Z")

</div>

My dad tells a joke about a man who misheard his doctor telling him he was impotent, so he went home in a suit and tie back to his wife because the doc said he was "important" 😅

Not sure I can tie a joke to this one though!

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [April 6, 2025, 9:55pm UTC](https://forum.inductiveautomation.com/t/time-based-screen-rotation-help/104734/19 "2025-04-06T21:55:00Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/d/bdf7aa418ac9dcfa56652c19510548740a86572d.jpeg)
