# Get all elements in Revit

**URL:** <https://forum.dynamobim.com/t/get-all-elements-in-revit/3119>\
**Category:** Developers\
**Created:** [February 8, 2016, 7:13am UTC](https://forum.dynamobim.com/t/get-all-elements-in-revit/3119 "2016-02-08T07:13:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pedro\_Pinheiro](https://avatars.discourse-cdn.com/v4/letter/p/6a8cbe/32.png) [@Pedro\_Pinheiro](https://forum.dynamobim.com/u/Pedro_Pinheiro)\
**Post date:** [February 8, 2016, 7:13am UTC](https://forum.dynamobim.com/t/get-all-elements-in-revit/3119/1 "2016-02-08T07:13:59Z")

</div>

Hi,

&nbsp;

Is there a way to get all elements in a Revit model from dynamo without having to create a node for every category? I am using several categories nodes and the all elements of category node, and i would like to do it with just one node or python script.

Also, is it possible to include view specific elements like tags on that?

&nbsp;

Regards,

Pedro Pinheiro

---

<div class="post-metadata">

**Author:** ![Pedro\_Pinheiro](https://avatars.discourse-cdn.com/v4/letter/p/6a8cbe/32.png) [@Pedro\_Pinheiro](https://forum.dynamobim.com/u/Pedro_Pinheiro)\
**Post date:** [February 8, 2016, 10:31am UTC](https://forum.dynamobim.com/t/get-all-elements-in-revit/3119/2 "2016-02-08T10:31:05Z")

</div>

I am trying to get all elements in Model by a Python Script, but i am new to Revit API, so this is what i got so far.

I am getting an error, saying that "view cannot be a template view. Any ideas how to solve this?

![All Elements in Model](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/b/b9f3a734e0158cdd228f0fcbf1e456b40e529679.jpg)

---

<div class="post-metadata">

**Author:** ![Dimitar\_Venkov](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dimitar_venkov/32/2068_2.png) [@Dimitar\_Venkov](https://forum.dynamobim.com/u/Dimitar_Venkov)\
**Post date:** [February 8, 2016, 7:51pm UTC](https://forum.dynamobim.com/t/get-all-elements-in-revit/3119/3 "2016-02-08T19:51:21Z")

</div>

Hi,

You’re almost there. Dynamo has a problem with displaying some Revit elements (like for example view templates). Try wrapping the append in a try/catch clause like so:

 ![Revit_2016-02-09_09-19-12](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/c/c892470b5cdd96dee910e53ebc7f455b3f15d4b3.png)

---

<div class="post-metadata">

**Author:** ![Pedro\_Pinheiro](https://avatars.discourse-cdn.com/v4/letter/p/6a8cbe/32.png) [@Pedro\_Pinheiro](https://forum.dynamobim.com/u/Pedro_Pinheiro)\
**Post date:** [February 10, 2016, 12:00pm UTC](https://forum.dynamobim.com/t/get-all-elements-in-revit/3119/4 "2016-02-10T12:00:35Z")

</div>

Thank you!

&nbsp;

Worked perfectly. Just needed to add some filters to get only the categories i wanted.

---

<div class="post-metadata">

**Author:** ![Michal\_Dengusiak](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/michal_dengusiak/32/92831_2.png) [@Michal\_Dengusiak](https://forum.dynamobim.com/u/Michal_Dengusiak)\
**Post date:** [February 10, 2016, 3:28pm UTC](https://forum.dynamobim.com/t/get-all-elements-in-revit/3119/5 "2016-02-10T15:28:20Z")

</div>

Works great thanks

---

<div class="post-metadata">

**Author:** ![Konrad\_K\_Sobon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/konrad_k_sobon/32/8838_2.png) [@Konrad\_K\_Sobon](https://forum.dynamobim.com/u/Konrad_K_Sobon)\
**Post date:** [February 5, 2017, 12:47am UTC](https://forum.dynamobim.com/t/get-all-elements-in-revit/3119/7 "2017-02-05T00:47:53Z")

</div>

Question originally posted in this post was already answered. If you want to ask a new question, please start a new thread. Apparently you have done so here: [Query all objects in model if their parameters are filled in](https://forum.dynamobim.com/t/query-all-objects-in-model-if-their-parameters-are-filled-in/9337) There is no need to ressurect this thread. I will close this discussion.

---

<div class="post-metadata">

**Author:** ![Konrad\_K\_Sobon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/konrad_k_sobon/32/8838_2.png) [@Konrad\_K\_Sobon](https://forum.dynamobim.com/u/Konrad_K_Sobon)\
**Post date:** [February 5, 2017, 12:47am UTC](https://forum.dynamobim.com/t/get-all-elements-in-revit/3119/8 "2017-02-05T00:47:57Z")

</div>


