Loadable Family Categories Dynamo

Get All Loadable Family Categories in Revit

During the process of developing a custom family browser for the BIMicon Toolbar, the following question surfaced; how can we classify which family categories can be loaded and which others were system families? In other words, what are the all loadable family categories in Revit? Well, for a quick enumeration I went to Dynamo and wrote a script for just this purpose:

The steps to get these categories are:

  1. Create a Python script to retrieve all family categories that are not system families. This can be achieved with the cladd Family as System Families are not included in it: https://www.revitapidocs.com/2022/f51d019d-6ff3-692b-d1d2-b497cab564de.htm
  2. Filter out the families that cannot be edited, as this means not editable in the family editor; this excluded Curatin Mullion, Curtain Panel, and View Title
  3. Select all unique items in the list output from the Python script
  4. Join all elements in list for csv output
  5. Write all loadable family categories to a csv file in the hard drive

And that is the few steps to follow to get all loadable family categories in Revit:

Area Tags
Balusters
Callout Heads
Columns
Detail Items
Division Profiles
Door Tags
Doors
Elevation Marks
Furniture
Generic Annotations
Grid Heads
Keynote Tags
Material Tags
Parking
Planting
Profiles
Property Line Segment Tags
Revision Cloud Tags
Room Tags
Section Marks
Span Direction Symbol
Spot Elevation Symbols
Stair Landing Tags
Stair Run Tags
Stair Support Tags
Stair Tags
Structural Beam System Tags
Structural Columns
Structural Framing
Structural Framing Tags
Supports
Terminations
Title Blocks
View Reference
Window Tags
Windows
Level Heads

The Python script contains the following code:

# Import clr and dlls
import clr

clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager

# Retrieve current document
doc = DocumentManager.Instance.CurrentDBDocument

# Retrieve all families that are not system families in current doc
fam_types = FilteredElementCollector(doc).OfClass(Family)

# Filter the editable families and output result
out = []

for f in fam_types:
	if (f.IsEditable):
		out.append(f.FamilyCategory.Name)

OUT = out

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *