Rename family names

clockwork
dynamo
data-shapes
#1

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

18 Likes

Family names
Adding a Prefix to the family list in the project browser in Dynamo
#2

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

2 Likes

#3

Rename family names.dyn (21.5 KB)

4 Likes

#4

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

2 Likes

#6

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

2 Likes

#7

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

#8

Got a use case?

0 Likes

#9

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.

0 Likes

#10

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

#11

Our designtech package has some RegEx stuff too!

2 Likes

#12

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

0 Likes

#13

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

2 Likes

#14

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.

0 Likes

#15

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

0 Likes

#16

Find_Replace_Text_Using_RegEx.dyn (35.5 KB)

@JacobSmall 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.

4 Likes

#17

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

2 Likes

#18

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

#19

@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

0 Likes

#20

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

1 Like

#21

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