Adding a Prefix to the family list in the project browser in Dynamo

Hi All, Im new to Dynamo,

Have learned how to rename families using a script in Dynamo, but now id like to add my company code to the start of each family that doesn’t have anything before it

for instance before to rename the family i used a script to change

“GCD_ SURVEY_ Basic Wall” to “SVP_ SURVEY_ Basic Wall”

Now id like to add “SVP” to all the family list that just has it name and no ‘String’,
Just “Basic wall” or “Cylinder part 1” or " Basic Ceiling"

Hope you can help

Bets Wishes

Hi,

Can you show us what you’re doing in the .dyn file?

Durmus

This is how i renamed the families first time round,
now I’d like to put SVP start like this…
Screenshot%20(9)

Use string.Contains and List.FilterByBooleanMask to get only the elements you need (i.e. those without the prefix), as you already know how to do it.

Then you can use a code block to add the prefix to the name, and use this new name as input for Element.SetName

Thank you @lucamanzoni,

So i use the existing script and add yours in?
or just use this one?

Sorry im new to this, also I cant find Elements.Type, do you know what package that would be in?

Bets wishes

Just replace the String.Replace node (together with node blocks “GCD” and “SVP”) in your graph with the green group of mine. Of course instead of NEW youd need to write the prefix you want :wink:

Element.Type is from Archillab package, you don’t actually need for it, but download the package anyway because it’s great

1 Like

Like this? or do i need to change more?

Thats worked so Far. but hasn’t done all of them

Thank you @lucamanzoni

This workflow works with system families, like walls, floors, etc… because you are actually renaming the type.
For normal families I guess you want to rename the Family, not the Type.

Take a look at other posts in the forum like this:

1 Like

Thank you @lucamanzoni, Ive done it!!

Sorry I didnt explain it very well, but wanted to change the system family names.

But thank you so much for your help :raised_hands:

I used this script

not sure why the “Elements” is in yellow tho, but it worked

:raised_hands:

If you hover over the little speech box above the yellow node it will give you a message to give a clue as to what’s wrong :slight_smile:

Hey !!

Question 1 - i want to rename Family Type in my project , just add the prefix ELE_LUM_ to the family type of the Category : Luminaires .
i did my script like this but i can’t push the new names from revit to dynamo so if you could help me i will be thankful.

Question 2 - Also i want to add the same prefix ELE_LUM_ to the family name in the Category Luminaire but i cant chose the family name in dynamo ;
is there a method just to filter the wanted family name in dynamo

instead of choose all the families names in all the project?
thanx for helping :slight_smile:

here is the first picture of the project browser where i want to add the prefix ELE_LUM_ to the family type and also to the family name ( family typen are in yellow and family name are in red)

Thanx :slight_smile:project%20browser%20(Family)

@lucamanzoni @severnpartnership @Durmus_Cesur
i forgot to mention you in the post if any one of u can help me i will be thankful :slight_smile: