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?
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:
from Autodesk.Revit.DB import BuiltInParameter, FilteredElementCollector
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
el_types = FilteredElementCollector(doc).WhereElementIsElementType().ToElements()
el = UnwrapElement(IN)
for i in el_types:
name = i.get_Parameter(BuiltInParameter.SYMBOL_NAME_PARAM).AsString()
if name ==IN:
type = i
for k in el:
OUT = type
Thank you very much @Dmytro_Serebriian! It worked!