# How to get all custom properties of a component, window, etc?

**URL:** <https://forum.inductiveautomation.com/t/how-to-get-all-custom-properties-of-a-component-window-etc/16290>\
**Category:** Ignition\
**Created:** [December 11, 2017, 7:49pm UTC](https://forum.inductiveautomation.com/t/how-to-get-all-custom-properties-of-a-component-window-etc/16290 "2017-12-11T19:49:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrogers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mrogers/32/4110_2.png) [@mrogers](https://forum.inductiveautomation.com/u/mrogers)\
**Post date:** [December 11, 2017, 7:49pm UTC](https://forum.inductiveautomation.com/t/how-to-get-all-custom-properties-of-a-component-window-etc/16290/1 "2017-12-11T19:49:19Z")

</div>

I’m working on troubleshooting something and I thought it’d be pretty cool to get all custom properties of all windows open, maybe go deeper to templates/template properties, etc so I can poll them periodically and get their values. Any way to do this easily?

Also while I’m at it, any way to get the binding for a given property?

Thanks!

EDIT: Looks like I should have done some more research before posting - looks like .getProperties() will do for the basic things I want, though I’d still like to know if someone can tell me how to get the actual binding information (like expression text, sql text, etc).

---

<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:** [December 11, 2017, 8:25pm UTC](https://forum.inductiveautomation.com/t/how-to-get-all-custom-properties-of-a-component-window-etc/16290/2 "2017-12-11T20:25:26Z")

</div>

> [@mrogers](#):
>
> how to get the actual binding information

Start [here](http://files.inductiveautomation.com/sdk/javadoc/ignition79/793/com/inductiveautomation/factorypmi/application/FPMIWindow.html), look at the getInteractionController() method, and continue down the rabbit hole. (-:  
You should note that bindings are not part of the component, but are part of the window. For generic components, they are established on window open. For template elements, they are created and destroyed as templates are selected and deselected in the various holders. (But still as objects of the window.)  
Also note that while documented for module developers, these APIs are very much not supported nor guaranteed to hang around.

---

<div class="post-metadata">

**Author:** ![mrogers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mrogers/32/4110_2.png) [@mrogers](https://forum.inductiveautomation.com/u/mrogers)\
**Post date:** [December 12, 2017, 12:07am UTC](https://forum.inductiveautomation.com/t/how-to-get-all-custom-properties-of-a-component-window-etc/16290/3 "2017-12-12T00:07:33Z")

</div>

Ah, that is quite the rabbit hole! Very cool stuff, definitely going to be diving into it more!

---

<div class="post-metadata">

**Author:** ![cesrom](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@cesrom](https://forum.inductiveautomation.com/u/cesrom)\
**Post date:** [February 19, 2018, 8:31pm UTC](https://forum.inductiveautomation.com/t/how-to-get-all-custom-properties-of-a-component-window-etc/16290/4 "2018-02-19T20:31:24Z")

</div>

Hi, @mrogers.

How can I access the .getProperties() method you mentioned?

I’m looking at only getting the Custom Properties from one window and passing them as params to another window.

---

<div class="post-metadata">

**Author:** ![cesrom](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@cesrom](https://forum.inductiveautomation.com/u/cesrom)\
**Post date:** [February 20, 2018, 12:58am UTC](https://forum.inductiveautomation.com/t/how-to-get-all-custom-properties-of-a-component-window-etc/16290/5 "2018-02-20T00:58:10Z")

</div>

There might be a better way to do this, but by messing around I found that I could create a parameters dictionary from a window with the following code:

```auto
# Initialize variables.
root_container = event.source.parent

# Initialize dictionary.
parameters = {}

properties = root_container.getProperties().tolist()

for property in properties:
	parameters[str(property)] = root_container.getPropertyValue(str(property))

print parameters

```

As I say, there might be a better way to do this. If there is, please share your solution.
