# Select elements by specified view

**URL:** <https://forum.dynamobim.com/t/select-elements-by-specified-view/5901>\
**Category:** Revit\
**Tags:** revit\
**Created:** [August 30, 2016, 9:31am UTC](https://forum.dynamobim.com/t/select-elements-by-specified-view/5901 "2016-08-30T09:31:24Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChrisS](https://avatars.discourse-cdn.com/v4/letter/c/c37758/32.png) [@ChrisS](https://forum.dynamobim.com/u/ChrisS)\
**Post date:** [August 30, 2016, 9:31am UTC](https://forum.dynamobim.com/t/select-elements-by-specified-view/5901/1 "2016-08-30T09:31:24Z")

</div>

Im trying to write a Dynamo script to enable element selection by view to allow me to group tag specific elements within a specific set of views but am new to Dynamo so not too sure how to go about this. Has anyone done this before who could point me in the right direction?  
Thanks.

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [August 30, 2016, 9:56am UTC](https://forum.dynamobim.com/t/select-elements-by-specified-view/5901/2 "2016-08-30T09:56:24Z")

</div>

Hi Chris,

There is a custom node from archi-lab package to collect elements by category and view is what your looking for.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/f/fff8a34d17615c923cd938ddd615d9bca088f0fb.png)

---

<div class="post-metadata">

**Author:** ![Rooney\_Wayne](https://avatars.discourse-cdn.com/v4/letter/r/8e7dd6/32.png) [@Rooney\_Wayne](https://forum.dynamobim.com/u/Rooney_Wayne)\
**Post date:** [October 5, 2017, 1:37am UTC](https://forum.dynamobim.com/t/select-elements-by-specified-view/5901/3 "2017-10-05T01:37:41Z")

</div>

I cannot find the Node anymore in the package

---

<div class="post-metadata">

**Author:** ![mbnbrs](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@mbnbrs](https://forum.dynamobim.com/u/mbnbrs)\
**Post date:** [November 2, 2017, 3:42am UTC](https://forum.dynamobim.com/t/select-elements-by-specified-view/5901/4 "2017-11-02T03:42:36Z")

</div>

Try “Select.ByCategoryAndView” in Archi-lab\_Grimshaw Package.

---

<div class="post-metadata">

**Author:** ![Tahaij](https://avatars.discourse-cdn.com/v4/letter/t/a8b319/32.png) [@Tahaij](https://forum.dynamobim.com/u/Tahaij)\
**Post date:** [April 1, 2018, 7:50am UTC](https://forum.dynamobim.com/t/select-elements-by-specified-view/5901/5 "2018-04-01T07:50:01Z")

</div>

It is not available in the Archi-Lab Package. How to get the same. any Ideas??

---

<div class="post-metadata">

**Author:** ![Nico\_Stegeman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nico_stegeman/32/19204_2.png) [@Nico\_Stegeman](https://forum.dynamobim.com/u/Nico_Stegeman)\
**Post date:** [April 1, 2018, 1:48pm UTC](https://forum.dynamobim.com/t/select-elements-by-specified-view/5901/6 "2018-04-01T13:48:38Z")

</div>

1. Elements in view by category from MEPover Package
2. Select.ByCategoryAndView from Archilab Package
3. python

cheers

---

<div class="post-metadata">

**Author:** ![slocusBTDXV](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@slocusBTDXV](https://forum.dynamobim.com/u/slocusBTDXV)\
**Post date:** [February 21, 2019, 10:37am UTC](https://forum.dynamobim.com/t/select-elements-by-specified-view/5901/7 "2019-02-21T10:37:42Z")

</div>

Why it doesn’t work with the category of textual notes ?

---

<div class="post-metadata">

**Author:** ![t.large](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/t.large/32/89412_2.png) [@t.large](https://forum.dynamobim.com/u/t.large)\
**Post date:** [January 2, 2020, 2:34pm UTC](https://forum.dynamobim.com/t/select-elements-by-specified-view/5901/8 "2020-01-02T14:34:14Z")

</div>

So I dug into the Node “Get Elements in View in Document by Category” that is within the Bakery package.

It seems that it is supposed to do what everyone here is looking for, however the Python script is malfunctioning. I’ll attach a screenshot below of the code and paste the error message as well in case anyone is interested.

```
Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed. 
Traceback (most recent call last):`
File "<string>", line 20, in <module>
TypeError: expected Document, got Document

```

 ![1-2-2020 9-31-14 AM](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/f/ffab21096a6c393e7ee4a65ef6251495a157d098.png)

I’m not sure what it’s issue is, as it states it expected Document and then received Document. But maybe someone more proficient in Python has some insite.

---

<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:** [January 2, 2020, 2:53pm UTC](https://forum.dynamobim.com/t/select-elements-by-specified-view/5901/9 "2020-01-02T14:53:23Z")

</div>

The python script seems correct. Rather, your document input is probably incorrect.  
Use _Get Documents_ or _Current Document_ nodes of _archilab_ package for this input.

---

<div class="post-metadata">

**Author:** ![t.large](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/t.large/32/89412_2.png) [@t.large](https://forum.dynamobim.com/u/t.large)\
**Post date:** [January 2, 2020, 3:18pm UTC](https://forum.dynamobim.com/t/select-elements-by-specified-view/5901/10 "2020-01-02T15:18:59Z")

</div>

I’ll have to try the Archilab _Current Document_ node, is there a reason the Stock “_Current.Document_” node (or Code Block node that contains “`Document.Current;`”) does not play nice with the Python Script?
