# Call all elements in Document

**URL:** <https://forum.dynamobim.com/t/call-all-elements-in-document/101756>\
**Category:** Revit\
**Tags:** python, dynamo\
**Created:** [June 10, 2024, 12:02pm UTC](https://forum.dynamobim.com/t/call-all-elements-in-document/101756 "2024-06-10T12:02:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rlandkroon](https://avatars.discourse-cdn.com/v4/letter/r/7ba0ec/32.png) [@rlandkroon](https://forum.dynamobim.com/u/rlandkroon)\
**Post date:** [June 10, 2024, 12:02pm UTC](https://forum.dynamobim.com/t/call-all-elements-in-document/101756/1 "2024-06-10T12:02:48Z")

</div>

Dear Specialists,

My endgoal it to receive all elements in the document. Not only the active view.  
When i call WhereElementIsNotElementType I dont receive all elements that are in document (only active view). So i Call WhereElementIsElementType. After this I receive ElementTypes or other types.

How to convert this to a normal Element where I can work with?

From  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/e/6eadad27b352127a15ccb9cb9f59f553e91d4fd3.png)

To  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/4/845baa8e1c5bba7ee06398aa410c71a615c315bf.png)

Or could I directly call all elements in document (not only active view) without via ElementType?

```auto
import clr

#load the Revit API
from Autodesk.Revit.DB import *

#load the Documentmanager out of library RevitServices
from RevitServices.Persistence import DocumentManager

#load the Current View (with Revit Services)
doc = DocumentManager.Instance.CurrentDBDocument

#load the Elements in view (with Revit API) and Unwrap it!
ELEMENTEN = UnwrapElement(FilteredElementCollector(doc).WhereElementIsElementType().ToElements())

OUT = ELEMENTEN

```

---

<div class="post-metadata">

**Author:** ![Mike.Buttery](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mike.Buttery](https://forum.dynamobim.com/u/Mike.Buttery)\
**Post date:** [June 10, 2024, 12:31pm UTC](https://forum.dynamobim.com/t/call-all-elements-in-document/101756/2 "2024-06-10T12:31:04Z")

</div>

No need to unwrap from a `FilteredElementCollector` as it retrieves a collection of Revit `Element` types which are not Dynamo types (DS type).  
If you really _want_ to get everything start with  
`OUT = FilteredElementCollector(doc).ToElements()`  
The Dynamo Python node will convert these to DS types when processing the result  
**EDIT** Jacob is correct re: FEC requiring at least one filter - see below (I was not at my workstation to check) - also this - [Do Not Filter For All Elements](https://thebuildingcoder.typepad.com/blog/2010/06/filter-for-all-elements.html)

---

<div class="post-metadata">

**Author:** ![rlandkroon](https://avatars.discourse-cdn.com/v4/letter/r/7ba0ec/32.png) [@rlandkroon](https://forum.dynamobim.com/u/rlandkroon)\
**Post date:** [June 10, 2024, 12:44pm UTC](https://forum.dynamobim.com/t/call-all-elements-in-document/101756/3 "2024-06-10T12:44:48Z")

</div>

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/8/08ff1b65c1575a489ef335255dd6f35f4ff46a34.png)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [June 10, 2024, 12:57pm UTC](https://forum.dynamobim.com/t/call-all-elements-in-document/101756/4 "2024-06-10T12:57:54Z")

</div>

Yeah - all filtered element collectors need some manor of filter.

Try this:  
`OUT = FilteredElementCollector(doc). WhereElementIsNotElementType().ToElements()`

That should get all elements in the model except for element types, which while they are in the file they are not yet in the design.

---

<div class="post-metadata">

**Author:** ![rlandkroon](https://avatars.discourse-cdn.com/v4/letter/r/7ba0ec/32.png) [@rlandkroon](https://forum.dynamobim.com/u/rlandkroon)\
**Post date:** [June 10, 2024, 1:33pm UTC](https://forum.dynamobim.com/t/call-all-elements-in-document/101756/5 "2024-06-10T13:33:35Z")

</div>

Thanks!!
