# Swap to Popup with Different Dimensions

**URL:** <https://forum.inductiveautomation.com/t/swap-to-popup-with-different-dimensions/73790>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [May 16, 2023, 2:39pm UTC](https://forum.inductiveautomation.com/t/swap-to-popup-with-different-dimensions/73790 "2023-05-16T14:39:33Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tnichols](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tnichols/32/73331_2.png) [@tnichols](https://forum.inductiveautomation.com/u/tnichols)\
**Post date:** [May 16, 2023, 2:39pm UTC](https://forum.inductiveautomation.com/t/swap-to-popup-with-different-dimensions/73790/1 "2023-05-16T14:39:33Z")

</div>

Many of my popups include navigation to other popups. For example, if a given pressure sensor is used to determine the position of a valve, I can get to the valve popup from the sensor popup and vice versa. Most of my popups have the same dimensions, so the function [system.nav.swapWindow](https://docs.inductiveautomation.com/display/DOC81/system.nav.swapWindow) works well. However, a few of my popups are bigger. The system.nav.swapWindow function forces the opened popup into the same dimensions as the closed popup.

Is there a way to swap to a new popup, such that the new popup is at the same coordinates as the old popup, but with its default dimensions?

---

<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:** [May 16, 2023, 3:04pm UTC](https://forum.inductiveautomation.com/t/swap-to-popup-with-different-dimensions/73790/2 "2023-05-16T15:04:22Z")

</div>

`.swapWindow` is really designed for maximized main windows. I don't recall anyone using it with popups. You should just make a shared script that opens the new popup, moves it to the position of the old popup, and closes the old popup.

---

<div class="post-metadata">

**Author:** ![tnichols](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tnichols/32/73331_2.png) [@tnichols](https://forum.inductiveautomation.com/u/tnichols)\
**Post date:** [May 16, 2023, 3:20pm UTC](https://forum.inductiveautomation.com/t/swap-to-popup-with-different-dimensions/73790/3 "2023-05-16T15:20:13Z")

</div>

Okay. That sounds like a good plan.

Just checking... As far as you know, there is no function that to reset the dimensions of a popup? Then I could do a swap followed by dimension reset.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [May 16, 2023, 3:26pm UTC](https://forum.inductiveautomation.com/t/swap-to-popup-with-different-dimensions/73790/4 "2023-05-16T15:26:10Z")

</div>

Perhaps one of these posts will be helpful?

> [@Change perspective popup size after it is opened](https://forum.inductiveautomation.com/t/change-perspective-popup-size-after-it-is-opened/38623):
>
> Hi, Like vision I’d like to reside popup from popup itself. I want to put a button in my popup and when user click it it extend the width of the popup to show some detail info. Thanks for any help or idea.

> [@Perspective Popup runtime resize behavior](https://forum.inductiveautomation.com/t/perspective-popup-runtime-resize-behavior/57007):
>
> I would like to open a popup view and resize it while it is open if the user clicks on a button. When the popup is open and not moved (from the position it was open on) the enlargement of the popup works perfectly fine, meaning it resizes to the new dimension and with a close button it will shrink down to the original size. The problem occurs when I drag/move the pop up from the position it was opened at and then try to resize it . The following is the original sized popup this is …

[https://forum.inductiveautomation.com/search?q=perspective%20popup%20resize](https://forum.inductiveautomation.com/search?q=perspective%20popup%20resize)

---

<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:** [May 16, 2023, 3:31pm UTC](https://forum.inductiveautomation.com/t/swap-to-popup-with-different-dimensions/73790/5 "2023-05-16T15:31:27Z")

</div>

> [@jlandwerlen](#):
>
> one of these posts

This post is 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:** [May 16, 2023, 3:32pm UTC](https://forum.inductiveautomation.com/t/swap-to-popup-with-different-dimensions/73790/6 "2023-05-16T15:32:21Z")

</div>

> [@tnichols](#):
>
> to reset the dimensions of a popup?

Not that I'm aware of. Just don't use swap for popups.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [May 16, 2023, 3:33pm UTC](https://forum.inductiveautomation.com/t/swap-to-popup-with-different-dimensions/73790/7 "2023-05-16T15:33:05Z")

</div>

Oops 🙂

---

<div class="post-metadata">

**Author:** ![tnichols](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tnichols/32/73331_2.png) [@tnichols](https://forum.inductiveautomation.com/u/tnichols)\
**Post date:** [May 16, 2023, 3:45pm UTC](https://forum.inductiveautomation.com/t/swap-to-popup-with-different-dimensions/73790/8 "2023-05-16T15:45:42Z")

</div>

Got it. Thank you!
