Get size of unopened windows

I’m looking to get a list of all of the Windows that we have in our SCADA system, and categorise them by main/popup/docked by pulling the info from their config using their size, layer, and docking settings.
I am getting the full list of windows using system.gui.getWindowNames(), but I don’t know where to go to from here to pull out their properties?

I’ve tried using:

from com.inductiveautomation.factorypmi.application import FPMIWindow
windowPaths = system.gui.getWindowNames()
windows = [FPMIWindow(windowPath) for windowPath in windowPaths]

print windows[0].preferredSize

but all I get are 0’s. I presume it’s because the windows aren’t actually open, so really they don’t have a width… How do I get to the config object instead, so that I can read the config I need?

Hello @nminchin. Did you find a way to achieve that? i am actually also interrested on it.

What i posted here could be repurposed to return "size" instead of text/tooltiptext/title (of only the root then i suppose)

for the print i didnt do only the root object yet tho

not all of the code will be needed for this tho, but it gets you started

(seems to need to be version 8.1+)