# ElementType.ByName in Revit 2020

**URL:** <https://forum.dynamobim.com/t/elementtype-byname-in-revit-2020/72575>\
**Category:** Revit\
**Created:** [January 24, 2022, 1:36pm UTC](https://forum.dynamobim.com/t/elementtype-byname-in-revit-2020/72575 "2022-01-24T13:36:30Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_Vijay](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/_vijay/32/91307_2.png) [@\_Vijay](https://forum.dynamobim.com/u/_Vijay)\
**Post date:** [January 24, 2022, 1:36pm UTC](https://forum.dynamobim.com/t/elementtype-byname-in-revit-2020/72575/1 "2022-01-24T13:36:30Z")

</div>

Is Revit 2020 and Dynamo 2.3.1 did have node “ElementType.ByName” as Revit 2022.

is there any alternative way to “ElementType.ByName” in Revit 2020?

---

<div class="post-metadata">

**Author:** ![GavinNicholls](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gavinnicholls/32/190442_2.png) [@GavinNicholls](https://forum.dynamobim.com/u/GavinNicholls)\
**Post date:** [January 24, 2022, 1:39pm UTC](https://forum.dynamobim.com/t/elementtype-byname-in-revit-2020/72575/2 "2022-01-24T13:39:31Z")

</div>

Try my custom package Crumple. There is a node that can do exactly this under Crumple \> Revit \> Element types

---

<div class="post-metadata">

**Author:** ![\_Vijay](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/_vijay/32/91307_2.png) [@\_Vijay](https://forum.dynamobim.com/u/_Vijay)\
**Post date:** [January 24, 2022, 1:42pm UTC](https://forum.dynamobim.com/t/elementtype-byname-in-revit-2020/72575/3 "2022-01-24T13:42:29Z")

</div>

Nope!

Not working As in ElementType.ByName in Revit 2022.

@erfajo Orchid working but not as in Revit 2022.

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

---

<div class="post-metadata">

**Author:** ![GavinNicholls](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gavinnicholls/32/190442_2.png) [@GavinNicholls](https://forum.dynamobim.com/u/GavinNicholls)\
**Post date:** [January 24, 2022, 1:43pm UTC](https://forum.dynamobim.com/t/elementtype-byname-in-revit-2020/72575/4 "2022-01-24T13:43:56Z")

</div>

Oh that’s different yes - mine works with literal element types in Dynamo (like the element type dropdown options, not family types). Probably not possible in 2020 or prior without some Python and some targetted categories/family type names.

---

<div class="post-metadata">

**Author:** ![\_Vijay](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/_vijay/32/91307_2.png) [@\_Vijay](https://forum.dynamobim.com/u/_Vijay)\
**Post date:** [January 24, 2022, 2:07pm UTC](https://forum.dynamobim.com/t/elementtype-byname-in-revit-2020/72575/5 "2022-01-24T14:07:50Z")

</div>

Hm…So I think need to crate a script to do this.

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [January 24, 2022, 9:26pm UTC](https://forum.dynamobim.com/t/elementtype-byname-in-revit-2020/72575/6 "2022-01-24T21:26:24Z")

</div>

## For Element Types:

use a code block and eliminate the need for a custom package:

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

and the code to paste in a code block:  
`DSCore.Types.FindTypeByNameInAssembly("WallType", "RevitAPI");`

note: replace “WallType” with whatever your element type you selected in the dropdown is.

* * *

## For Family Types (tested in Revit 2020):

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/f/7fcd8edc52eaa2fd38a73f9ba6defa01734cebe0.png)

`Revit.Elements.FamilyType.ByName("A1 metric");`

---

<div class="post-metadata">

**Author:** ![\_Vijay](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/_vijay/32/91307_2.png) [@\_Vijay](https://forum.dynamobim.com/u/_Vijay)\
**Post date:** [January 25, 2022, 3:10am UTC](https://forum.dynamobim.com/t/elementtype-byname-in-revit-2020/72575/7 "2022-01-25T03:10:49Z")

</div>

@john_pierson Astonish to me. Tanks a lot. 🥰

---

<div class="post-metadata">

**Author:** ![\_Vijay](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/_vijay/32/91307_2.png) [@\_Vijay](https://forum.dynamobim.com/u/_Vijay)\
**Post date:** [January 25, 2022, 3:29am UTC](https://forum.dynamobim.com/t/elementtype-byname-in-revit-2020/72575/8 "2022-01-25T03:29:45Z")

</div>

@john_pierson Any thoughts?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/2/d2f03993a78a68de6a8606ed77e0fcd298dc232e.png)  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/a/da13bb74bf5fb1611c52573beb58f2abbab94c8a.png)

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [January 25, 2022, 5:45am UTC](https://forum.dynamobim.com/t/elementtype-byname-in-revit-2020/72575/9 "2022-01-25T05:45:40Z")

</div>

What’s the error say?

---

<div class="post-metadata">

**Author:** ![\_Vijay](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/_vijay/32/91307_2.png) [@\_Vijay](https://forum.dynamobim.com/u/_Vijay)\
**Post date:** [January 25, 2022, 5:57am UTC](https://forum.dynamobim.com/t/elementtype-byname-in-revit-2020/72575/10 "2022-01-25T05:57:33Z")

</div>

> Warning: FamilyType.ByName operation failed.  
> A FamilySymbol with the specified name, MVS-AR-SlabEdge\_ 24" x 12", does not exist in the document.

But it does.

the Revit 2022 got that. Revit 2020 did not.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/c/9c9aeeb02c2912c5214311b8fcc05f179d60405f.png)

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [January 25, 2022, 3:30pm UTC](https://forum.dynamobim.com/t/elementtype-byname-in-revit-2020/72575/11 "2022-01-25T15:30:51Z")

</div>

Hmm, maybe the handling within that node had changed between versions.

---

<div class="post-metadata">

**Author:** ![\_Vijay](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/_vijay/32/91307_2.png) [@\_Vijay](https://forum.dynamobim.com/u/_Vijay)\
**Post date:** [January 25, 2022, 3:31pm UTC](https://forum.dynamobim.com/t/elementtype-byname-in-revit-2020/72575/12 "2022-01-25T15:31:20Z")

</div>

I think So.

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [January 25, 2022, 4:19pm UTC](https://forum.dynamobim.com/t/elementtype-byname-in-revit-2020/72575/13 "2022-01-25T16:19:02Z")

</div>

It looks like that one should work with the elementtype method I mentioned.

Although I think there is a chance we are running into problems with the family name not having the same spaces, case, etc.

I tend to do this kind of thing to eliminate those kind of issues.

 ![elementTypeCaseInsensitive](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/f/4f866eb609add20fe9d3745d65a492f6677654c9.png)

[elementTypeCaseInsensitive.dyn](https://forum.dynamobim.com/uploads/short-url/zeN0nABceGHPPF0thPfASkREedB.dyn) (24.1 KB)

---

<div class="post-metadata">

**Author:** ![\_Vijay](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/_vijay/32/91307_2.png) [@\_Vijay](https://forum.dynamobim.com/u/_Vijay)\
**Post date:** [January 25, 2022, 4:25pm UTC](https://forum.dynamobim.com/t/elementtype-byname-in-revit-2020/72575/14 "2022-01-25T16:25:24Z")

</div>

I coped the family name and past in the code block in both.

in the same template in Revit 2022 got that name. but Revit 2020 did not.

---

<div class="post-metadata">

**Author:** ![\_Vijay](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/_vijay/32/91307_2.png) [@\_Vijay](https://forum.dynamobim.com/u/_Vijay)\
**Post date:** [January 25, 2022, 4:33pm UTC](https://forum.dynamobim.com/t/elementtype-byname-in-revit-2020/72575/15 "2022-01-25T16:33:46Z")

</div>

When I try to use the drop-down to design script using monocle dynamo crashing.

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

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [January 25, 2022, 4:46pm UTC](https://forum.dynamobim.com/t/elementtype-byname-in-revit-2020/72575/16 "2022-01-25T16:46:10Z")

</div>

Aw yeah. I just pushed a monocle update yesterday that fixed that. It happens when you are in manual run mode and the drop down has not been ran. (Also I did attach my graph above)

---

<div class="post-metadata">

**Author:** ![\_Vijay](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/_vijay/32/91307_2.png) [@\_Vijay](https://forum.dynamobim.com/u/_Vijay)\
**Post date:** [April 20, 2022, 10:29am UTC](https://forum.dynamobim.com/t/elementtype-byname-in-revit-2020/72575/18 "2022-04-20T10:29:39Z")

</div>

@erfajo thanks for the reply. I will check that.
