Object move inside the vision template by property

I’m looking for a method to move an object within a template based on a property of the template itself. (i read this: Moving Template inside window based on tag value in Ignition 8 - Ignition - Inductive Automation Forum)
I figured out how to move objects with system.gui.transform but I didn’t understand when to trigger the script.
I try in a property change event but is fired only when the property is really change in runtime! how to do first time? is not clear for me
is possible

if event.propertyName == 'ROT':
	if event.newValue == 0:
		xPos = 7
		yPos = 18
	elif event.newValue == 90:
		xPos = 15
		yPos = 48
	elif event.newValue == 180:
		xPos = 7
		yPos = 34
	else :
		xPos = 0
		yPos = 48

	system.gui.transform(component=event.source.getComponent('Label_MID'), newX=xPos, newY=yPos)