Getting all parameter types, group types and categories

In Revit 2024, I found that the “new school” method (ForgeTypeId) was missing about 10 spec types, including Fill Pattern, Image, Integer, Load Classification, Material, Multiline Text, Number of Poles, Text, URL and Yes/No.
I changed UnitUtils for SpecUtils and modified the Specs (ForgeTypeId) script:

import clr

clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import SpecUtils, LabelUtils

def label(ftid):
    return LabelUtils.GetLabelForSpec(ftid), ftid.TypeId, ftid

OUT = sorted(map(label, SpecUtils.GetAllSpecs()))

I referenced this post by @GavinCrump : Replace Family Parameters with shared parameters - #15 by GavinCrump

2 Likes