# All Instances from Element Type

**URL:** <https://forum.dynamobim.com/t/all-instances-from-element-type/16884>\
**Category:** Packages\
**Created:** [November 28, 2017, 12:16am UTC](https://forum.dynamobim.com/t/all-instances-from-element-type/16884 "2017-11-28T00:16:35Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![awilliams](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/awilliams/32/114496_2.png) [@awilliams](https://forum.dynamobim.com/u/awilliams)\
**Post date:** [November 28, 2017, 12:59am UTC](https://forum.dynamobim.com/t/all-instances-from-element-type/16884/2 "2017-11-28T00:59:08Z")

</div>

I’m honestly drawing a blank on whether or not this is possible without Python 🤔 here’s the Python code I have for this:

```
import clr
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
doc = DocumentManager.Instance.CurrentDBDocument

texttype = UnwrapElement(IN[0])

if not isinstance(IN[0], list): texttype = [texttype]
alltext = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_TextNotes)

texts = []

for type in texttype:
	for x in alltext:
		if x.TextNoteType.Id == type.Id:
			texts.append(x)

OUT = texts

```

IN[0] should be the TextNoteType you are pulling with your `x[0]` Code Block but it can also accept a list of TextNoteTypes

---

_[View the full topic](https://forum.dynamobim.com/t/all-instances-from-element-type/16884)._
