Find and Replace Text Note Types

revit
#1

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

2 Likes

#2

Hi @kverbitsky

Your inputs are not right. Do this changes:

0 Likes

#3

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

0 Likes

#4

Kayla hope this will help you understand?

0 Likes

#5

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

0 Likes

#6

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

2 Likes

#7

@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. :slight_smile:

4 Likes

#8

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)

2 Likes

#9

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

0 Likes

#10

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

0 Likes

#11

This is amazing. Thanks so much!

0 Likes

#12

@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!

1 Like

#13

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 :slight_smile:

0 Likes

#14

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.

2 Likes

#15

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! :slight_smile:

0 Likes

#16

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

1 Like

#17

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 :wink: How to get help on the Dynamo forums)

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. :slight_smile: 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 :grin:

0 Likes