# Can we call custom methods written on components present in a template by accessing the template instance from vision windows?

**URL:** <https://forum.inductiveautomation.com/t/can-we-call-custom-methods-written-on-components-present-in-a-template-by-accessing-the-template-instance-from-vision-windows/49638>\
**Category:** Ignition\
**Tags:** ignition80, ignition81, vision\
**Created:** [August 6, 2021, 11:57am UTC](https://forum.inductiveautomation.com/t/can-we-call-custom-methods-written-on-components-present-in-a-template-by-accessing-the-template-instance-from-vision-windows/49638 "2021-08-06T11:57:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ravi\_Nimase](https://avatars.discourse-cdn.com/v4/letter/r/a9a28c/32.png) [@Ravi\_Nimase](https://forum.inductiveautomation.com/u/Ravi_Nimase)\
**Post date:** [August 6, 2021, 11:57am UTC](https://forum.inductiveautomation.com/t/can-we-call-custom-methods-written-on-components-present-in-a-template-by-accessing-the-template-instance-from-vision-windows/49638/1 "2021-08-06T11:57:53Z")

</div>

Can we call custom methods written on components present in a template by accessing the template instance from vision windows?

I do have a template which is having the Power table component, I have written the custom method to resize the column width automatically. I have called the same method on data property change and it is working fine. But I also want to call the same method from the Vision window, but I am able to access the power table through the template instance but not able to execute the custom method.

Please provide a valuable solution for this.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 6, 2021, 12:27pm UTC](https://forum.inductiveautomation.com/t/can-we-call-custom-methods-written-on-components-present-in-a-template-by-accessing-the-template-instance-from-vision-windows/49638/2 "2021-08-06T12:27:35Z")

</div>

Try installing my Simulation Aids module. Good chance that will make it "Just Work". See this discussion:

> [@Transaction groups triggered expression item updating when trigger is false](https://forum.inductiveautomation.com/t/transaction-groups-triggered-expression-item-updating-when-trigger-is-false/17196/12):
>
> Interesting. That means custom methods behave like custom properties in java-to-jython conversions. So, Java objects have to be wrapped in jython shells to be used within the jython interpreter. The standard java-to-jython shell exposes the methods as-is and also takes any methods that fit the NetBeans getter/setter naming conventions and exposes those as the corresponding properties. Ignition overrides the standard conversions so that its components have their custom properties and methods …
