# Access Window Custom Property From Project Script

**URL:** <https://forum.inductiveautomation.com/t/access-window-custom-property-from-project-script/66608>\
**Category:** Ignition\
**Tags:** ignition80, vision, scripting\
**Created:** [November 16, 2022, 10:00pm UTC](https://forum.inductiveautomation.com/t/access-window-custom-property-from-project-script/66608 "2022-11-16T22:00:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![israel.jordan](https://avatars.discourse-cdn.com/v4/letter/i/ce73a5/32.png) [@israel.jordan](https://forum.inductiveautomation.com/u/israel.jordan)\
**Post date:** [November 16, 2022, 10:00pm UTC](https://forum.inductiveautomation.com/t/access-window-custom-property-from-project-script/66608/1 "2022-11-16T22:00:10Z")

</div>

Hello,

I have a need to access a custom property located on a Window Root Container within my project. I need to access the property from a function in my Project Library. I am able to get a reference to the windows using `system.gui.getWindow()` but I am having issues with the rest of the path to my custom property. Is there someone who can point me in the right direction?

Thanks in advance!

---

<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:** [November 16, 2022, 10:15pm UTC](https://forum.inductiveautomation.com/t/access-window-custom-property-from-project-script/66608/2 "2022-11-16T22:15:00Z")

</div>

If `getWindow` returns something not-null, then you should just need to address into the root container and then find the component by its path, e.g.:  
`system.gui.getWindow("name").rootContainer.getComponentForPath("path")`

---

<div class="post-metadata">

**Author:** ![israel.jordan](https://avatars.discourse-cdn.com/v4/letter/i/ce73a5/32.png) [@israel.jordan](https://forum.inductiveautomation.com/u/israel.jordan)\
**Post date:** [November 16, 2022, 10:50pm UTC](https://forum.inductiveautomation.com/t/access-window-custom-property-from-project-script/66608/3 "2022-11-16T22:50:35Z")

</div>

Thanks for the reply. `getWindow()` does return something but I am still unable to access the Custom Property of the Root Container. I have placed an example of what I am doing below.

```auto
windowContainer = system.gui.getWindow("WINDOW_NAME").rootContainer
customPropertyVal = windowContainer.getComponent("customPropertyName")

windowContainer -> Root Container
customPropertyVal -> None

```

---

<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:** [November 16, 2022, 11:06pm UTC](https://forum.inductiveautomation.com/t/access-window-custom-property-from-project-script/66608/4 "2022-11-16T23:06:01Z")

</div>

If you're trying to access a particular custom property on the root container, you don't need `getComponent` at all:

```auto
windowContainer = system.gui.getWindow("WINDOW_NAME").rootContainer
customPropertyVal = windowContainer.customPropertyName

```

You only need `getComponent`, `getComponentForPath`, etc, if you are trying to access a different component under the root.
