Dynamo changing my Python output?

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

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

However, if I output the filteredList I get:
image

I am so confused!

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

I think you get the same if you make List(element_types).

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 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.

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

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