Navigation help

Please someone give me some hints or point me in the right direction.

I want a navbar at the top. So on my navbar or have main_button and SubMain_button. I see how to make it so a button opens another window. I see the option to swap/close, but this will close my navbar window.

Is there a way to use buttons in my north window (my navbar) to open a new floating window and close the active floating window but not the parent window(my navbar) of the button being pressed, (without having a case statement for each window name in the project)?

I see that system.nav.openWindow('mitp') opens the new target.

Is there something like system.nav.CloseWindow(avtiveFloatingWindow) ?

:prayer: … bump…

system.nav.swapTo(“Alarm Distribution Lists”)


Traceback (innermost last):

  File "<event:actionPerformed>", line 7, in ?

ValueError: Window 'Alarm Distribution Lists' does not exist.

Ignition v7.2.8 (b178)
Java: Sun Microsystems Inc. 1.6.0_26

So the parent of the action is the navbar(north Window). If I issue a swap from there it will close my nave bar. How can a call a command to close the floating(main) window before opening a new window, without closing my navbar(parent of event). Is there a global variable for avtive windows? Can I create a global variable and store the main window ID in it each time a new window opens and then manually open my new window.

oldMain = 'new_window'

I would think there would be a better way to do this. :scratch:

Do you have your navbar window docked north and your main window maximized?

The system.nav.swapTo function should work as you’re requesting. You can also see system.nav.swapWindow

Have you read this section of the user manual? Also - download and play around with the Ignition Example Project to see this in action.

ok, thanks.


This did the trick. I wish there was a way to ID the current main window. Does this swap remove resources from the active window? Does it remove the resources before the new window is created?

This seems to be a popular topic. See this thread.

@ecujak, check out this (2008) video on Navigation. The designer looks a little different, but the navigation principals are still the same.

As far as the tab strip, that works a little differently. When set on the default “Swap to window” Navigation mode, you need to do the following: In the Tab Data dataset, the NAME field needs to match your window names exactly (it is case sensitive). You can show whatever you want in the corresponding DISPLAY_NAME. The best way to edit this is via the Tab Strip Customizer, by right clicking the tab strip -> customizers -> tab strip customizer (or Cntl+U).