Renaming family parameters in a project

Hey everyone,

I made this script with the help of many youtube videos. It opens families in a directory, renames specific family parameters and then closes and saves the families.
I now want to do the exact same thing but this time with families in a project and not a directory.
So the script would open all the families in an opened project, rename specific family parameters and then closes and saves the families in and outside the project.
Anyone has suggestions on how I could do this?


Rename family parameters.dyn (40.4 KB)

Look into the script I posted in this thread which opens families from project and lets you modify them as family documents then reload them after. The orchid package could do this also, and has some extra nodes for renaming parameters.

1 Like

Thank you!

1 Like


I now have this problem. The FamilyParameter.Rename node expects a Revit.Application.Document but the Python Script gives a Autodesk.Revit.DB.Document (which I still anyways need for the FamilyDoc.Parameters node). Is there a way to convert Autodesk.Revit.DB.Document to Revit.Application.Document?

@alshammary.l

Place the node ToOrchidType between the python node and the orchid node.

The orchid node need a orchid document

image
Unfortunately that didn’t work, I tried all these 4 but none took Autodesk.Revit.DB.Document

Nevermind I solved it!

If you’re going to give yourself the solution, at least attach the script and solution for others.

3 Likes

Yes of course,
Here is the script:
Rename family parameters in project.dyn (43.6 KB)
I also added this code line in the Python Script (Edit Family) Node:
for fam in uw_list:

if fam.IsEditable:

because the node took in uneditable families as well.

1 Like