Project Properties via code

I have some apps that do double duty as view only full screens, and the need to have some reports and lookup table maintenance, etc…

I would like to programmatically turn of the menus based on the machine name.

Thanks

This isn’t directly possible - you can theoretically retrieve project properties in the runtime, but modifying them wouldn’t actually do anything to your running client.

If you just need to toggle the menu bars, then that’s the approach to take. Theoeretically, something like this might work:

from javax.swing import SwingUtilities
from com.inductiveautomation.factorypmi.application import FPMIApp

fpmiapp = SwingUtilities.getAncestorOfClass(FPMIApp, <some component reference>)
if fpmiapp is not None:
    # to hide
    fpmiapp.clientPanel.menu = None
    # to show
    fpmiapp.clientPanel.rebuildMenu()
1 Like

Thanks! Now that I think of it, I would almost have to tell Ignition the machine name before it is even running…