# Access Template Size

**URL:** <https://forum.inductiveautomation.com/t/access-template-size/12708>\
**Category:** Ignition\
**Created:** [February 23, 2017, 6:22pm UTC](https://forum.inductiveautomation.com/t/access-template-size/12708 "2017-02-23T18:22:45Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 7, 2017, 4:29pm UTC](https://forum.inductiveautomation.com/t/access-template-size/12708/4 "2017-03-07T16:29:13Z")

</div>

What Nick Mudge is doing in that demo (while very cool) is also not officially supported, and I would caution against building any kind of project that relies on its functionality; there’s no guarantee that it will continue to work in future versions.

That said, I was able to modify his drag and drop project to print the root template’s actual width/height - I’ll leave it to you to modify for your purposes if you so choose.

I added the following to lines 30 and 31 of the visionWindowOpened event handler script on the ‘Templates’ docked window:

`	template = XMLDeserializer.deserialize(context.createDeserializer(), obj.getSerializedBytes(), None)
	print template.getName(), template.getWidth(), template.getHeight()`

Basically, Nick’s project is looking through the project’s resources from the backend, then deserializing them out of Ignition’s encoded format. The additional lines I added perform a second deserialization step to get the root template object directly from the project resources, before it’s actually created.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/539224135e5f239f58a259cd82f0640478977cd1.png)

---

_[View the full topic](https://forum.inductiveautomation.com/t/access-template-size/12708)._
