# Dynamo changing my Python output?

**URL:** <https://forum.dynamobim.com/t/dynamo-changing-my-python-output/99690>\
**Category:** Developers\
**Created:** [April 3, 2024, 4:40pm UTC](https://forum.dynamobim.com/t/dynamo-changing-my-python-output/99690 "2024-04-03T16:40:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alien](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alien/32/40701_2.png) [@Alien](https://forum.dynamobim.com/u/Alien)\
**Post date:** [April 3, 2024, 4:40pm UTC](https://forum.dynamobim.com/t/dynamo-changing-my-python-output/99690/1 "2024-04-03T16:40:58Z")

</div>

What am I missing?  
I’ve got some python:

```auto
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager

# Get the current document
doc = DocumentManager.Instance.CurrentDBDocument

element_types = FilteredElementCollector(doc).OfClass(ElementType).WhereElementIsElementType()

filteredList = []
for el in element_types:
	if "ViewFamilyType" in str(el):
		filteredList.append(el)

OUT = filteredList

```

If I output the element\_types they look like this:  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/e/6e2dc1081b4596887679e927529ac38469d06270.png)

However, if I output the filteredList I get:  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/a/caef765a2623e379528030dc1c41ce803364db26.png)

I am so confused!

Also this isn’t what I was trying to do. I want to grab all the viewport types. ☹

---

<div class="post-metadata">

**Author:** ![BenSaci](https://avatars.discourse-cdn.com/v4/letter/b/919ad9/32.png) [@BenSaci](https://forum.dynamobim.com/u/BenSaci)\
**Post date:** [April 3, 2024, 4:51pm UTC](https://forum.dynamobim.com/t/dynamo-changing-my-python-output/99690/2 "2024-04-03T16:51:51Z")

</div>

> [@Alien](#):
>
> `element_types`

I think you get the same if you make List(element\_types).

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [April 3, 2024, 5:20pm UTC](https://forum.dynamobim.com/t/dynamo-changing-my-python-output/99690/3 "2024-04-03T17:20:59Z")

</div>

The elements in `filteredList` are being translated back into their Dynamo wrappers.

As @BenSaci guessed, that happens when elements are in a list. (You can also use `collection.ToElements()` or `collection.ToElementIds()` to convert the collection to a list of elements or Ids respectfully.)

If you look at the [FilteredElementCollector](https://www.revitapidocs.com/2024/263cf06b-98be-6f91-c4da-fb47d01688f3.htm) class, you’ll see that it’s not a list but a collection (enumerable). There is no enumerable wrapper in Dynamo, so the elements don’t get translated from the collector.

---

<div class="post-metadata">

**Author:** ![jmark](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@jmark](https://forum.dynamobim.com/u/jmark)\
**Post date:** [April 5, 2024, 10:18am UTC](https://forum.dynamobim.com/t/dynamo-changing-my-python-output/99690/4 "2024-04-05T10:18:36Z")

</div>

I’m not sure what you’re trying to do but if you just want to get enumerable why not just use the OOTB node element types?  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/a/ca1e69b8a0ee9416e8335db7ce4eaea581bd299e.png)

---

<div class="post-metadata">

**Author:** ![Alien](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alien/32/40701_2.png) [@Alien](https://forum.dynamobim.com/u/Alien)\
**Post date:** [April 5, 2024, 12:52pm UTC](https://forum.dynamobim.com/t/dynamo-changing-my-python-output/99690/5 "2024-04-05T12:52:50Z")

</div>

Because I want all of them in a list for my UI.
