Compare Revit to out of box families

Hello. Any thoughts about using Dynamo to get family and family types in a model and comparing them against the OOTB families to see which ones have been “added” to the model?

I would try this in two parts. First, get all of the families of a project newly created from your template of choice (as this affects which families are loaded in by default). You can then get the UniqueId of each of the families and export this to another file, such as a CSV or XLSX. I would export your data in two columns (Family Name and UniqueId). Then, with the user’s project open, import the same data, get the UniqueIds for each of the families in that project, and compare the two lists. Using the Family Name and UniqueId for each project, you can use a dictionary to determine the name of the families which have been added. Essentially, you want to compare based on UniqueId only, as families may still be renamed while maintaining the same UniqueId.

Here is what the dictionary would look like in the format of 'UniqueId': 'Family Name’

{
'abc123': 'Family 1'
'def456': 'Family 2'
}

If you are sure that a given project uses the same template you are testing it against and both projects have the family abc123, you can consider it to be OOTB.

I am unsure of how to most easily get all family types through vanilla Dynamo, but a way of doing it in python would be something like this:

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import FilteredElementCollector, FamilySymbol
clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager

doc = DocumentManager.Instance.CurrentDBDocument
OUT = FilteredElementCollector(doc).OfClass(FamilySymbol)

This could further be modified to also output their UniqueIds and Names:

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import FilteredElementCollector, FamilySymbol
clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager

doc = DocumentManager.Instance.CurrentDBDocument
families = FilteredElementCollector(doc).OfClass(FamilySymbol)
ids = [family.UniqueId for family in families]
names = [family.Name for family in families]
OUT = zip(ids, names)