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?
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.
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?
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.
Hi Alsh, I am trying to use the Dyn you shared for renaming family parameter, however I have got warinng, the FamilyDoc.Parameters does not return element names as shown in your screenshot. Refer the attached. How can I get element names from the out of FamilyDoc.Parameters? Thanks
Hi Alsh, I am trying to use the Dyn you shared for renaming family parameter, however I have got warinng, the FamilyDoc.Parameters does not return element names as shown in your screenshot. Refer the attached. How can I get element names from the output of FamilyDoc.Parameters? Thanks
Thanks. I have uninstalled Crumple 2024 and re-installed 2022.5, the String.StartsWith is working now. However the String.Replace did not work, So I flattened list as you suggested, it worked.
But after it falttened to input FamilyParameter.Rename did not get any input, waring shown as below. Any advice? Thanks
Hi Gavin,
I am using the dynamo to rename family parameter in project, I am using Revit 2023,and Crumple 2022.5. Is that correct version for Revit 2023? I can see FamilyDoc.Paramers node, namelist cannot be used as input for String.Replace, So I have flattened as Jacob suggested, so Replace note is working, but when use this flattened list as input for FamilyPamater.Rename, it says no parameter found by the name. I have created 3 family parameters for a few families in the project named AA-TT1, AA-TT2 and AA-TT3, try to replace AA to BB. I can see it works well before rename node. no object found for rename is warning. Cany advice for it? Also I could not find the FamilyParameter.Rename in Crumple package 2022.5
My nodes are all built to maintain a list of list structure throughout, in line with family documents. In the event only one list of parameters/names are given, it applies longest list structure. Generally, my nodes don’t play nicely with Orchid unless you convert the DB objects to Orchid objects.
In earlier errors you are feeding parameters into a string input. Typical input error, read the message and it will tell you what you give it vs what it needs.
In current build there is an error in replace params node that is fixed on github but not on package manager, time hasn’t been on my side as of late so still have to get back to this… I’ve fixed it for now in below dataset.
Thanks Gavin. I tried Bulk replace Dynamo, an warning said custom node definition is not loaded for Windows.FilterBackups. I have gor Crumple 2022.5 installed? Which package should I use? I am using Revit 2023. Thanks
Hi Gavin,
The dynamo you shared is for bulk replace family parameter with shared parameter. It works well with latest Crumple. Thank you.
I am looking for replace family parameters, starting with AA and replace with starting with BB. I am stuck in String.startwith from Orchid which requires string. while the FamilyDoc.Getparameters from Cumple output is array. I have tried use FamilyParam.name to get namelist to pass to String.Startswith. but it did not work. I have also tried to rename Families in the directory not from Project. I am struggling to make it works. Can you please help with issues? The dynamo I am working on is the one Alsh shared. refer the attached. Thanks
I have got a dynamo download to rename family parameters from directory, it did not work, same issues as the one Rename from Project. Refer the attached. Can you advise anything missing? Thanks Rename family parameters from Directory.dyn (44.5 KB)