# Unfamiliar Scripting: component.initialize()

**URL:** <https://forum.inductiveautomation.com/t/unfamiliar-scripting-component-initialize/33373>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [March 24, 2020, 6:18pm UTC](https://forum.inductiveautomation.com/t/unfamiliar-scripting-component-initialize/33373 "2020-03-24T18:18:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AIO](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aio/32/87549_2.png) [@AIO](https://forum.inductiveautomation.com/u/AIO)\
**Post date:** [March 24, 2020, 6:18pm UTC](https://forum.inductiveautomation.com/t/unfamiliar-scripting-component-initialize/33373/1 "2020-03-24T18:18:25Z")

</div>

Hey folks,

I ran into a script / function that I’m unfamiliar with today and cannot seem to find it documented anywhere. Hoping someone can help point me to some documentation. The entirety of the property change script is as follows:

```auto
if event.propertyName == "ID":
		
	movingAI = event.source.getComponent('MAI')
	movingAI.initialize()

```

This is my first time seeing .initialize(), and can’t seem to find more information anywhere. What it should do seems intuitive to me, but I’d like to learn more about it.

Thanks.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [March 24, 2020, 6:48pm UTC](https://forum.inductiveautomation.com/t/unfamiliar-scripting-component-initialize/33373/2 "2020-03-24T18:48:16Z")

</div>

Are you sure it isn’t a custom method on that control?  
Go into scripting on the control and look at the methods.

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [March 24, 2020, 8:07pm UTC](https://forum.inductiveautomation.com/t/unfamiliar-scripting-component-initialize/33373/3 "2020-03-24T20:07:32Z")

</div>

There are a lot of components that have an initialize() method which is accessible for technical reasons, but is not documented because we don’t intend for you to use them.

---

<div class="post-metadata">

**Author:** ![AIO](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aio/32/87549_2.png) [@AIO](https://forum.inductiveautomation.com/u/AIO)\
**Post date:** [March 24, 2020, 10:51pm UTC](https://forum.inductiveautomation.com/t/unfamiliar-scripting-component-initialize/33373/4 "2020-03-24T22:51:53Z")

</div>

Thanks, Kathy. Any where I could glean some more technical info? I’d like to replace the function of this script, but would like to understand it better. It’s a moving analog indicator, for what it’s worth.

@MMaynard - no scripting embedded on the controlled component, that I can see.

---

<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 24, 2020, 11:24pm UTC](https://forum.inductiveautomation.com/t/unfamiliar-scripting-component-initialize/33373/5 "2020-03-24T23:24:26Z")

</div>

The Moving Analog Indicator _doesn’t_ have an `initialize()` function in our code; are you sure it’s not a custom method? [https://docs.inductiveautomation.com/display/DOC80/Custom+Component+Methods](https://docs.inductiveautomation.com/display/DOC80/Custom+Component+Methods)

---

<div class="post-metadata">

**Author:** ![AIO](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aio/32/87549_2.png) [@AIO](https://forum.inductiveautomation.com/u/AIO)\
**Post date:** [March 25, 2020, 7:09pm UTC](https://forum.inductiveautomation.com/t/unfamiliar-scripting-component-initialize/33373/6 "2020-03-25T19:09:00Z")

</div>

Thanks for pointing me in the right direction, Paul. There is a custom method there that I overlooked initially. I appreciate the help in what now seems like a silly question.

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [March 25, 2020, 10:15pm UTC](https://forum.inductiveautomation.com/t/unfamiliar-scripting-component-initialize/33373/7 "2020-03-25T22:15:18Z")

</div>

Not silly – if you aren’t used to using custom methods you wouldn’t think to look there. Glad you found it!
