system.util.getProjectName() works fine in designer but system.nav.getCurrentWindow() does not
Using 7.9
My work around:
With component “comp” from target window
from com.inductiveautomation.factorypmi.application import FPMIWindow
if system.util.getSystemFlags() & system.util.DESIGNER_FLAG:
while not isinstance(comp.parent,FPMIWindow):
comp=comp.parent
curWindow=comp.parent.getPath()
else:
curWindow=system.nav.getCurrentWindow()