I have written a script that changes family name and type names. However, certain family categories do not operate with the script to change the family name; detail items, generic models are some examples. I assume this is because some “families” are not rename-able like “Filled Regions” but Generic models do not have any Revit OOTB families like that, yet it still doesn’t rename the family itself. Any suggestions?
This other topic holds more information on how I wrote the script.
It’s not necessarily about the category. Not all Detail Items are loadable families. The system elements (like filled regions) won’t have a Family definition. Some categories, like generic models, could also be in-place elements. The issue isn’t that some of the elements don’t allow you to change the family name, it’s that some elements don’t have families.
It would be helpful if you explained why you need to rename everything - or at least, which specific elements you do need to rename. Then you’ll need to separate those elements into ones with families and one without. Changing the names of those different “definitions” will vary, but it’s doable.
Understood. I need to rename everything because it is a requirement for a project I am working on. Maybe I could try an element node.
You (or whoever is making that request) is going to have to specify what “everything” means in this context. It’s common to say “everything” in order to cover all edge cases, but no one ever really means everything. Not every type would be able to be changed, nor would it even make sense. Does that just mean families? Not all elements have families? Does it just mean loadable elements? Not all elements are loadable. Does it mean all non-standard definitions? Which elements count as standard and which don’t?
The solution is to deal with each object type appropriately, but understanding the why is what’s going to make that easier.
1 Like
Looking at your screenshot, I think you‘ll need to:
- Remove nulls from your list of families
- Possibly filter out any remaining system families (there’s a node called Family.IsEditable in Clockwork for that)
- Use another node to pull the family names. The one you’re using is for family types only.
1 Like
Hi @ChrisGamble, as @Nick_Boyts mentioned, some element family names cannot be changed (you can’t do this in Revit either). Below is an example that will separate the element type and family, updating them according to the specified prefix and suffix.
Set Detail Item Name.dyn (27.2 KB)
I think thats a little over my head. I switched the family type to family and it gets me closer, but the families that are not null do not accept the change. Maybe thats the impossible thing.
I wish I had a why but there isnt one, its just a requirement for our families, I’d love to not have to do this at all but im not making the decisions. And I have a lot of models that need this change, so im trying to squeeze everything I can out of dynamo to eliminate any steps I can. But if its impossible, its impossible. Thanks.
The term “Family” is both a generic term for a hierarchy of many different Revit elements and also a specific one for certain types of elements. If it’s not explicitly stated which Families need to be modified then you can’t really fulfil the request.
It feels like you’re getting some elements with non-Family Types that are being grouped with the traditional FamilyTypes and running into issues there. Those Types would not have Families to modify.