# All Elements of Type in View

**URL:** <https://forum.dynamobim.com/t/all-elements-of-type-in-view/55564>\
**Category:** Revit\
**Created:** [September 25, 2020, 4:10pm UTC](https://forum.dynamobim.com/t/all-elements-of-type-in-view/55564 "2020-09-25T16:10:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniel1](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@daniel1](https://forum.dynamobim.com/u/daniel1)\
**Post date:** [September 25, 2020, 4:10pm UTC](https://forum.dynamobim.com/t/all-elements-of-type-in-view/55564/1 "2020-09-25T16:10:23Z")

</div>

Is it possible to get a list of all the elements of an element type in a view?  
Import Instances is an element type, but I can’t seem to get a list of them without using the node “All Elements in Active View”. Pulling every single element in a view is time consuming. It is much faster to pull all elements of a category in a view, but importInstances doesn’t seem to apply to any normal category. Is there a way to do this more directly, without filtering a much larger list?

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [September 25, 2020, 8:10pm UTC](https://forum.dynamobim.com/t/all-elements-of-type-in-view/55564/2 "2020-09-25T20:10:10Z")

</div>

Hi @daniel1,

It is possible with a collector:

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

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument

view = UnwrapElement(IN[0])
elementType = IN[1]

elements = FilteredElementCollector(doc,view.Id).OfClass(elementType).ToElements()

OUT = elements

```

 ![SelectByElemTypeAndView](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/c/4c3d8f9affbfe75429757aaa336670b073e48052.png)  
[SelectByElemTypeAndView.dyn](https://forum.dynamobim.com/uploads/short-url/fzR7pN9BkJMKDCEAEboAZvP6nfd.dyn) (6.9 KB)

---

<div class="post-metadata">

**Author:** ![daniel1](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@daniel1](https://forum.dynamobim.com/u/daniel1)\
**Post date:** [September 25, 2020, 8:18pm UTC](https://forum.dynamobim.com/t/all-elements-of-type-in-view/55564/3 "2020-09-25T20:18:17Z")

</div>

@Alban_de_Chasteigner, you are an amazing person! Thankyou.  
You’d think that “All Elements of Type in View” would be a standard node, but Lords of Dynamo have not seen fit to add it just yet.
