# Vision: Get a collection of all Containers

**URL:** <https://forum.inductiveautomation.com/t/vision-get-a-collection-of-all-containers/69222>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [January 31, 2023, 5:13pm UTC](https://forum.inductiveautomation.com/t/vision-get-a-collection-of-all-containers/69222 "2023-01-31T17:13:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Seth\_Kahle](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@Seth\_Kahle](https://forum.inductiveautomation.com/u/Seth_Kahle)\
**Post date:** [January 31, 2023, 5:13pm UTC](https://forum.inductiveautomation.com/t/vision-get-a-collection-of-all-containers/69222/1 "2023-01-31T17:13:29Z")

</div>

I have a Window with Root Container, and then 4 sub-containers nested inside of the root container. There are also some other components in the Root Container that I do NOT want to include. Is there an easy way to get a collection of all the sub-containers and loop through them to set some properties?

---

<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:** [January 31, 2023, 5:21pm UTC](https://forum.inductiveautomation.com/t/vision-get-a-collection-of-all-containers/69222/2 "2023-01-31T17:21:37Z")

</div>

```python
from com.inductiveautomation.factorypmi.application.components import BasicContainer

for component in rootContainer.components:
	if isinstance(component, BasicContainer):
		pass # it's a container
	else:
		pass # it's some other type of component

```

---

<div class="post-metadata">

**Author:** ![Seth\_Kahle](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@Seth\_Kahle](https://forum.inductiveautomation.com/u/Seth_Kahle)\
**Post date:** [January 31, 2023, 5:49pm UTC](https://forum.inductiveautomation.com/t/vision-get-a-collection-of-all-containers/69222/3 "2023-01-31T17:49:58Z")

</div>

Worked like a charm... how about setting the x,y coordinate of said sub-containers relative to the rootContainer?

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [January 31, 2023, 6:54pm UTC](https://forum.inductiveautomation.com/t/vision-get-a-collection-of-all-containers/69222/4 "2023-01-31T18:54:20Z")

</div>

You would need to use the `system.gui.transform()` to modify position or size at runtime.
