Templates master size by scripting

Is there a way to get them?
Tnx!

I’m going crazy…
I’ve a template changing on TemplatePath property, but and i want to resize it to the original template size using scripting… I’ve tried anything… no way! :cry:
Any idea?!

Did you ever come up with an answer to this question? I need to do the same thing.

Try something like:

[code]from com.inductiveautomation.factorypmi.application.components.util import FPMILayout
from com.inductiveautomation.factorypmi.application.model import TemplateManager
from com.inductiveautomation.ignition.client.util.gui import DrawingUtilities

root = event.source.parent #or whatever
templateManager = root.getAppContext().getApp().getTemplateManager()
templateId = templateManager.getId()
template = templateManager.getTemplateInstance(templateId)
mastersize = DrawingUtilities.round(FPMILayout.getBounds(template))[/code]

8)

Works great! Thank you.

This does not work for me, I think it has something to do with root = event.source.parent, what is the parent in context of this example?