Rename family names Dynamo 1.x

Hi all ,
I would like to share a Dynamo script with you, it allows to rename family names in the Revit model and it doesn’t require any instances to be places, it works searching inside the Project Browser. I just made it because it could happen sometimes that you need to deliver a Revit model and don’t want any “Prefix” or “Suffix” code that identifies companies, firms or something like that.

First of all, I was able to develop this script thanks to the clockwork :pray: and data-shapes :pray: packages, and of course all the members :upside_down_face: of this forum. So please download the above packages before launching the script.

Script description:
When you launch it, you’ll see a window popping up asking for

  1. What text do you want to search inside the project browser
  2. What text do you want to use to replace it

Click on “ok set the values” and you are good to go :v:. It is very simple, and of course customize it as you like.

Share this post link to friends and colleagues that may need it, hope it could be useful to you too, :peace_symbol:.

30 Likes

Looks cool man! Are you uploading a link or just showcasing? If a link, you may have missed posting it :slight_smile:

2 Likes

Rename family names.dyn (21.5 KB)

5 Likes

Yes I was uploading the link!
clearly your typing speed its faster than my uploading one! :slight_smile: thanks @solamour

3 Likes

@Ernesto_Pellegrino…This dynamo script is absolutely working fine and saved a lot time for me…thanks

1 Like

Great stuff @Ernesto_Pellegrino. I love when people use data-shapes to create workflows.

Something that might be interesting would be allowing the user to select the element type through the UI so they could find/replace views and sheets as well.

Also if anyone wanted to introduce regular expressions they would be my hero. I find myself copy/pasting a lot into notepad++ for this.

1 Like

Got a use case?

Hi there! This looks really good and non initiated dynamo users like me appreciate the user interface!

I was wondering if instead of looking for all families could you specify for example walls, or columns etc.?

Thanks!

Ignacio.

You can use regular expressions and rename families together in Dynamo. I think the Clockworks package has some regex nodes. Also, you can use a Python node and import the re module, allowing you to use the full scope of regular expressions however you want.

If you want to carry out file operations, you can import the Python shutil module. That should let you rename files.

4 Likes

Our designtech package has some RegEx stuff too!

2 Likes

@solamour true, but you have missed to include a node description :wink:

Yeah I know… :roll_eyes: Work in progress! I’ll whip up a blog post on it soon.

2 Likes

I don’t really have a specific use case. I just found myself often exporting data to excel with dynamo, copying the values into notepad++ to use RegEx, and then pasting the new values back into excel to read. Not horrible but could be better.

I do a lot of content creation for a supplier across hundreds of manufacturers so I spend a lot of my time standardizing content. If you change anything the ripple effect is huge and the maintenance becomes a monster. Regular expressions really speed up that process.

I have a current script working with RegEx that I will post later after I add a couple features.

I wrote an extremely simple python script last night but after seeing your comment I checked out the clockwork node. I don’t know how I missed that they had some RegEx nodes.

After comparing them the clockwork node was basically the same thing with a couple more bells and whistles so I ended up using it.

Thanks for the tip

Find_Replace_Text_Using_RegEx.dyn (35.5 KB)

@jacob.small Here is the example I was talking about earlier. I added the ability to change view names by their type or loadable families by category. You could easily add sheets/rooms/system families as well. Sorry for hijacking your thread @Ernesto_Pellegrino haha. Hopefully someone will find it useful.

6 Likes

sure, thank you @kbruxvoort …if we share, everybody wins :sunglasses:

2 Likes

I have replaced your Element.Category Node (Rhythm package) with Element.Category+ from Clockwork package. @john_pierson 's node gives me only null values and no error

1 Like

@Thomas_Vogt I think Element.Category returns you Null values because there are no elements as Input data. I mean, if you look at the list under Flatten, as you shown in the image, the list shows family types inside the project browser so probably for this reason he can not access the Element.Category property. Sorry for the “non-technical” explanation but its the only one I’ve got right now xD

@Thomas_Vogt @Ernesto_Pellegrino I tried using the script using dynamo 1.3.2 in Revit 2017 and 2018 and could not replicate the problem. The reason I chose the rhythm node is because it is the only method where I was able to pull the profile category.

Not a big deal to use Element.Category+ you just won’t be able to rename profile families.

image

1 Like

mmh ok, I have used the rac basic sample project for my test and german language, which is sometimes also an error reason :wink: just wanted to share what I have changed… I have not invested a lot of time xD

1 Like