Hi, does anyone know how I can change the Type of a family with dynamo?
See picture below
SetParameterByName node, and using “Type” doesn’t seems to work. It gives an error saying the parameter doesn’t exist.
I’m trying to change Type, under Family. Not the Symbol parameter since this would change it for all family types in the project. Preferably not using the family type dropdown menu, since this can cause some problems when someone else opens the script with dynamo. Anyone knows how to do this with a code block?
Hi, selim.celem!
Try something like this:
FamilyInstance.SetType you can get from ClockWork Package
It seems, my solution doesn’t work with levels
I think this will help you:

Python for copy/pasting:
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import BuiltInParameter, FilteredElementCollector
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
el_types = FilteredElementCollector(doc).WhereElementIsElementType().ToElements()
el = UnwrapElement(IN[1])
TransactionManager.Instance.EnsureInTransaction(doc)
for i in el_types:
name = i.get_Parameter(BuiltInParameter.SYMBOL_NAME_PARAM).AsString()
if name ==IN[0]:
type = i
for k in el:
k.ChangeTypeId(type.Id)
TransactionManager.Instance.TransactionTaskDone()
OUT = type
Thank you very much @Dmytro_Serebriian! It worked!
1 Like