I imported new Structural Framing types into Revit from a 3rd party software. Now I would like to replace all elements assigned to one of these types into a Revit “standard” types.
For instance, I now have a Revit project with structural framing elements of the following types:
UPE_140_test
IPE_160_test
IPE_180_test
IPE_220_test
HE_A_80_test
HE_A_120_test
and I would like to replace all elements from these types to the following “original” types of Revit:
UPE140
IPE160
IPE180
IPE220
HE_A80
HE_A120
Assuming I have a mapping between these 2 lists in an excel file or any other solution - how can I programmatically (or without using Python for Dynamo) replace all those structural framing elements from the types in first list above to the types in the second list above?
I managed to do a simple graph in Dynamo that manually iterates over the lists and updates those elements - but this is inefficient in case of many types I need to swap.
Looking for an iteration solution.
This works for me, assuming you just want the first family type of each family to be used. If you want types to be considered then you will need to add more data and list management.
Suggest in future you attach sample files and your script to get better help. In light of this, here is a screenshot of my script
Thank you, Gavin!
We will share some screenshots as I think this is not the exact solution for our case. We need to iterate over all family types of each family exists in, for instance, Structural Framing category.
The family by name parameter can return a family of any category however so it should work for any category really. You can incorporate types as a second column and then use them to get a family type by family name + type name which is another node similar to the one I used.
I intend for you to use my example simply as a reference for how you may continue to solve this challenge - the exact solution is up to you.
Currently model does not contain any elements from UPE80/UPE100/UPE120 and it does contain elements from UPE 80.European-V1.steel / UPE 100.European-V1.steel / UPE 120.European-V1.steel.
All elements under “UPE 80.European-V1.steel” family type, I would like to change their family type to “UPE80”. Same goes for UPE100 and UPE120.
I am trying to use this excel file to do the matching - Family types.xlsx (8.8 KB)
This is my current graph but I don’t think I am on the right track:
Element.setparameterbyname with the ‘Type’ parameter as name and a suitable type to swap it with should work. I think clockwork might have a more basic node than that again for setting typed iirc.
I think you’ll need to use the all elements of type node and the element types node to get wall types then can find matching index of the type name to get the intended wall types instead. If i recall correctly the family type node deals with loadable family types versus system.
The clockwork node probably expects a different list structure, and/ or no elements of those types are placed.
Thanks! Problem for the loadable families was that he didn’t find the elements.
For the system families I already tried with all elements. See topic I made, hopefully you see the solution? My goal is to change all my system/loadable families of an existing project with excel. Such as a configurator in Excel and push the changes to Revit.