Get all dimensions

How can I get all dimension styles, including those that are not in use in the current document?

So what have you tried so far?

do you mean dimension types ?

Wanted to see how Autodesk Assistant would handled this. Asked it to outline options and it fumbled finding All Elements of Class (opting for all elements of category instead) but indicated Python would work. A second prompt later I got this Python script:

# Generated by Autodesk Assistant at 2026-10-22T07:14:32.1981354Z
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import FilteredElementCollector, DimensionType

clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager

doc = DocumentManager.Instance.CurrentDBDocument

# Collect all DimensionType elements (dimension styles)
collector = FilteredElementCollector(doc)\
    .OfClass(DimensionType)\
    .ToElements()

dim_styles = list(collector)
names = [dt.Name for dt in dim_styles]

OUT = [dim_styles, names]

That works fine in Revit 2027 using the default Python engine. However it failed in 2024 using the default engine, so it sent a few more prompts to 2027 in order to get a method that works in both versions, resulting in this:

# Generated by Autodesk Assistant at 2026-10-22T07:26:40.8102665Z
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import FilteredElementCollector, DimensionType

clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager

doc = DocumentManager.Instance.CurrentDBDocument

# Collect all DimensionType elements (dimension styles)
collector = FilteredElementCollector(doc)\
    .OfClass(DimensionType)\
    .ToElements()

dim_styles = list(collector)
names = [dt.get_Name() for dt in dim_styles]

OUT = [dim_styles, names]

So All Elements of Category gets only the ones in use and All Eelements of Class get them all is that correct?

correct and the same if use dimension instead of dimension types in element classes ,you will only get them in use and if you want use Jacobs script and want only dimension in use just replace DimensionType with Dimension in line 4 and line 13 i guees it is , and should work as well…or in a codeblock

a = DSCore.Types.FindTypeByNameInAssembly
(“DimensionType”,“RevitAPI”);
b = ElementQueries.OfElementType(a);

learned something new :grinning_face: