# Find and Replace Text Note Types

**URL:** <https://forum.dynamobim.com/t/find-and-replace-text-note-types/15966>\
**Category:** Revit\
**Tags:** revit\
**Created:** [October 26, 2017, 3:54pm UTC](https://forum.dynamobim.com/t/find-and-replace-text-note-types/15966 "2017-10-26T15:54:09Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![kverbitsky](https://avatars.discourse-cdn.com/v4/letter/k/7ab992/32.png) [@kverbitsky](https://forum.dynamobim.com/u/kverbitsky)\
**Post date:** [October 26, 2017, 3:54pm UTC](https://forum.dynamobim.com/t/find-and-replace-text-note-types/15966/1 "2017-10-26T15:54:09Z")

</div>

I’ve inherited a project from a series of different revit users and ended up with over 30 different text styles. I was looking for an efficient way to find and replace the excess Text note Types with our standard types. I thought this would be a good opportunity to attempt my first Dyanmo Code. I’ve gotten as far as recognizing the types that I want to change, but I am getting stuck on changing the Type parameter to what I want them to be.

Any suggestions? Thanks in advance!

Kayla

 ![Find and Replace Text Note Types](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/f/5f1105ea2a22f94ab755ce8ce67334f3e4faf882.png)

---

<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:** [October 26, 2017, 4:03pm UTC](https://forum.dynamobim.com/t/find-and-replace-text-note-types/15966/2 "2017-10-26T16:03:10Z")

</div>

Hi @kverbitsky

Your inputs are not right. Do this changes:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/0/80688cd74ecb59e5a9251db36b2824fb75ba4e7f.jpg)

---

<div class="post-metadata">

**Author:** ![kverbitsky](https://avatars.discourse-cdn.com/v4/letter/k/7ab992/32.png) [@kverbitsky](https://forum.dynamobim.com/u/kverbitsky)\
**Post date:** [October 26, 2017, 5:21pm UTC](https://forum.dynamobim.com/t/find-and-replace-text-note-types/15966/3 "2017-10-26T17:21:01Z")

</div>

Hi @Kulkul,

Thanks so much for the response! So I made the changes you suggested, but I was hoping how you could tell me how you dictate which Text Note Type to change the parameter to? Also, after making these changes, I am getting a “Method not found” error @ Get Parameter Value. Any thoughts?

Thanks again for the help!

Kayla

 ![Find and Replace Text Note Types 2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/c/7cadfd13cbe8b3014fd2eee1bb0b38abe82a1c71.png)

---

<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:** [October 26, 2017, 5:37pm UTC](https://forum.dynamobim.com/t/find-and-replace-text-note-types/15966/4 "2017-10-26T17:37:38Z")

</div>

Kayla hope this will help you understand?

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

---

<div class="post-metadata">

**Author:** ![kverbitsky](https://avatars.discourse-cdn.com/v4/letter/k/7ab992/32.png) [@kverbitsky](https://forum.dynamobim.com/u/kverbitsky)\
**Post date:** [October 26, 2017, 7:16pm UTC](https://forum.dynamobim.com/t/find-and-replace-text-note-types/15966/5 "2017-10-26T19:16:34Z")

</div>

Hi @Kulkul,

Thanks so much for the breakdown! It was very helpful. I’m still having a hard time figuring out how to convert the selected Text Note Types to the **Standard Text Note Type**. When I run the code it runs without error, but it’s not actually changing my text note type…

Thanks so much for working through this with me!

Kayla

 ![Find and Replace Text Note Types 3](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/c/cc5b29809de95eaf789f10226bb9da106df72a14.png)

---

<div class="post-metadata">

**Author:** ![Steven](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/steven/32/112504_2.png) [@Steven](https://forum.dynamobim.com/u/Steven)\
**Post date:** [October 26, 2017, 9:10pm UTC](https://forum.dynamobim.com/t/find-and-replace-text-note-types/15966/6 "2017-10-26T21:10:14Z")

</div>

you can try this. I changed it very little. you need to feed the family into it.

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/2/1285771662d6e70ccfd428815d411c0efa1e8cdc.PNG)

---

<div class="post-metadata">

**Author:** ![awilliams](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/awilliams/32/114496_2.png) [@awilliams](https://forum.dynamobim.com/u/awilliams)\
**Post date:** [October 26, 2017, 9:17pm UTC](https://forum.dynamobim.com/t/find-and-replace-text-note-types/15966/7 "2017-10-26T21:17:09Z")

</div>

@kverbitsky Another method that would work would be to use the TextNoteType.ByName node, as shown below. It retrieves a TextNoteType form a string input. I assumed from your graph that you are using the FilterByBoolMask node to filter the text notes that you want to change the type of to the “GGLO\_Standard” string you had in your graph, but @Steven’s method works well also, as long as you already have an instance of a GGLO\_Standard text note in your project. 🙂

 ![TextNoteTypeChange](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/c/7c0d751ad0f1e3e2927d7ef423a74b378f3e8475.png)

---

<div class="post-metadata">

**Author:** ![Steven](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/steven/32/112504_2.png) [@Steven](https://forum.dynamobim.com/u/Steven)\
**Post date:** [October 26, 2017, 9:19pm UTC](https://forum.dynamobim.com/t/find-and-replace-text-note-types/15966/8 "2017-10-26T21:19:48Z")

</div>

Also check out this AU presentation. Does something a little different but really cool. Text part is at 23 minutes in. (The whole video is really good and worth watching)

> **[Everyday Dynamo: Automating Simple Solutions That Bridge Workflow Gaps Within...](http://au.autodesk.com/au-online/classes-on-demand/class-catalog/2016/dynamo-studio/ar20422#chapter=0)**
>
> Are you a Building Information Modeling (BIM) manager seeking to increase the efficiency of your company and project teams? Are you a model manager struggling through workflow issues? Or maybe you’re neither of those, but you work in Revit software...

---

<div class="post-metadata">

**Author:** ![Steven](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/steven/32/112504_2.png) [@Steven](https://forum.dynamobim.com/u/Steven)\
**Post date:** [October 26, 2017, 9:22pm UTC](https://forum.dynamobim.com/t/find-and-replace-text-note-types/15966/9 "2017-10-26T21:22:47Z")

</div>

I like your Method much more for calling the new text type. Thanks for sharing 🙂

---

<div class="post-metadata">

**Author:** ![kverbitsky](https://avatars.discourse-cdn.com/v4/letter/k/7ab992/32.png) [@kverbitsky](https://forum.dynamobim.com/u/kverbitsky)\
**Post date:** [October 26, 2017, 9:34pm UTC](https://forum.dynamobim.com/t/find-and-replace-text-note-types/15966/10 "2017-10-26T21:34:52Z")

</div>

thanks so much for this! I will definitely check it out! 🙂

---

<div class="post-metadata">

**Author:** ![kverbitsky](https://avatars.discourse-cdn.com/v4/letter/k/7ab992/32.png) [@kverbitsky](https://forum.dynamobim.com/u/kverbitsky)\
**Post date:** [October 26, 2017, 9:35pm UTC](https://forum.dynamobim.com/t/find-and-replace-text-note-types/15966/11 "2017-10-26T21:35:25Z")

</div>

This is amazing. Thanks so much!

---

<div class="post-metadata">

**Author:** ![awilliams](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/awilliams/32/114496_2.png) [@awilliams](https://forum.dynamobim.com/u/awilliams)\
**Post date:** [October 26, 2017, 9:39pm UTC](https://forum.dynamobim.com/t/find-and-replace-text-note-types/15966/12 "2017-10-26T21:39:53Z")

</div>

@Steven The structure of your graph would also work better, however, if one was cycling through changing the text note types of one text type to another, but changed out with TextNoteTypes \> All Elements of Type, to be able to call on TextNoteTypes that might not have been used in the project yet!

 ![TextNoteTypeChangeFilter](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/2/722b0057d00c6a41f4b3f69663eeb285cd734ebd.png)

---

<div class="post-metadata">

**Author:** ![awilliams](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/awilliams/32/114496_2.png) [@awilliams](https://forum.dynamobim.com/u/awilliams)\
**Post date:** [October 26, 2017, 9:41pm UTC](https://forum.dynamobim.com/t/find-and-replace-text-note-types/15966/13 "2017-10-26T21:41:26Z")

</div>

You’re welcome, glad to help with your first Dynamo Code - this was a good use of Dynamo! Please mark the solution for your post if your graph is working now 🙂

---

<div class="post-metadata">

**Author:** ![Steven](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/steven/32/112504_2.png) [@Steven](https://forum.dynamobim.com/u/Steven)\
**Post date:** [October 26, 2017, 9:59pm UTC](https://forum.dynamobim.com/t/find-and-replace-text-note-types/15966/14 "2017-10-26T21:59:15Z")

</div>

I was just thinking about my script (and your latest one). These could be used for anything. Since its pulling from Categories and Elements Types. They can be set to anything and the change can be made (to all wall, door, windown ex…) fairly handy script.

---

<div class="post-metadata">

**Author:** ![kverbitsky](https://avatars.discourse-cdn.com/v4/letter/k/7ab992/32.png) [@kverbitsky](https://forum.dynamobim.com/u/kverbitsky)\
**Post date:** [October 26, 2017, 10:29pm UTC](https://forum.dynamobim.com/t/find-and-replace-text-note-types/15966/15 "2017-10-26T22:29:34Z")

</div>

I was also just wondering… Could a similar code be written to remove the 8 million extra line types we have in the model as well? This definitely seems like the way to go to purge excess types from a model, but I know lines can be a bit tricky. Seriously, thank you everyone for all of the help! 🙂

---

<div class="post-metadata">

**Author:** ![Steven](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/steven/32/112504_2.png) [@Steven](https://forum.dynamobim.com/u/Steven)\
**Post date:** [October 26, 2017, 10:59pm UTC](https://forum.dynamobim.com/t/find-and-replace-text-note-types/15966/16 "2017-10-26T22:59:59Z")

</div>

Just an FYI People like different question be on a new post rather than changing the conversation in this one.  
With that said: Purging is the way to do it but is tricky because you cannot purge placed elements. you can however find the placed lines with the video I linked above and then purge them out.

Happy scripting

---

<div class="post-metadata">

**Author:** ![awilliams](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/awilliams/32/114496_2.png) [@awilliams](https://forum.dynamobim.com/u/awilliams)\
**Post date:** [October 27, 2017, 1:56am UTC](https://forum.dynamobim.com/t/find-and-replace-text-note-types/15966/17 "2017-10-27T01:56:09Z")

</div>

> [@kverbitsky](#):
>
> Could a similar code be written to remove the 8 million extra line types we have in the model as well?

In short, and to the effect of what @Steven is saying, yes you can obtain and purge excess line styles from a model, but it is best that you first try to work something out yourself (for one, it will help you learn! But it is also suggested that you have an attempted graph of what you are trying to achieve in any post on this forum, see here if you haven’t read yet, but I have a feeling you must’ve since your first post was very good 😉 [How to get help on the Dynamo forums](https://forum.dynamobim.com/t/how-to-get-help-on-the-dynamo-forums/4677))

Once you have tried something out, if you can’t figure it out on your own, as @Steven said, make a new thread, since this would be a different topic than the one we are on now. 🙂 Also always make full utilization of the search ability on this forum when trying to find solutions. I am sure you will find a way to get rid of those pesky extra line types 😁

---

<div class="post-metadata">

**Author:** ![Anahronis](https://avatars.discourse-cdn.com/v4/letter/a/f17d59/32.png) [@Anahronis](https://forum.dynamobim.com/u/Anahronis)\
**Post date:** [June 27, 2023, 8:32pm UTC](https://forum.dynamobim.com/t/find-and-replace-text-note-types/15966/18 "2023-06-27T20:32:59Z")

</div>

Hi, I’m trying to implement this script to Revit 2023 but I can’t find it ElementType node.  
Is there any Add? Clockwork Element.ElementType+ doesn’t work

---

<div class="post-metadata">

**Author:** ![mclough](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mclough/32/134664_2.png) [@mclough](https://forum.dynamobim.com/u/mclough)\
**Post date:** [November 8, 2023, 5:05pm UTC](https://forum.dynamobim.com/t/find-and-replace-text-note-types/15966/19 "2023-11-08T17:05:17Z")

</div>

2.16+ changed `Element Type` to `Element Classes`
