How to focus on the specified tab via script


In my extension at some point I want to focus on the “Environments” tab:

So for example user will have currently opened “Content” tab and at some point I want to switch to “Environments” tab automatically (so user won’t have to look for it and click manually). Is it possible to focus on the other tabs via script?

Another question related to this is that if it’s possible to close other tabs (“Showcases”, “NVIDIA Assets”, etc) through the script? So for example when user launches the extension, it will close all of the not needed tabs.

1 Like

@maciej.kuczkowski just a random thought, have you considered creating/saving a custom layout as a .json first then load/unload it programmatically instead? that way you don’t have to worry about reopening the different panels separately; you can revert by loading the startup/default layout.

1 Like

Good idea! I just thought that there is an easy way to switch between active tabs but loading different layouts sounds good as well so I’ll use this solution, thanks for help!

perhaps there is! loading the layout is just one of the options. hopefully mods/devs could offer additional inputs if there are better ways to achieve something like that.

my_window_handle = ui.Workspace.get_window(“My Window”)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.