Hi @Mepdot
You where missing tab and you need to define your inputs as var:
Here is the edited function:
def CategoryFamily(in1: var[]..[],in2: var[]..[])
{
element1 = Revit.Elements.Element.ElementType(in1);
familyinstance1 = Revit.FamilyInstance.ByFamilyType(element1);
family1 = Revit.FamilyInstance.GetFamily(familyinstance1);
t3 = DSCore.List.Flatten(family1, -1);
t4 = DSCore.List.UniqueItems(t3);
t5 = DSCore.List.Count(t4);
t6 = DSCore.List.AddItemToFront(in2,t4);
t7 = DSCore.List.AddItemToFront(t5,t6);
return t7;
};
Edit:
Another method with few lines: