Unit Types in Revit

Hi all,

Is there a way to export all Formats and unit types that Revit allows you to fill in a schedule?

For example,
Export Flow and see which format is possible to fill (liters per second, cubic meters per hour …)

And the same for all Common, HVAC, Piping, Electrical disciplines?

We have a lot of issues with the engineers in the company when they give us a schedule with units that Revit doesn’t allow you tu fill without make a conversion.

Thanks in advance.

I hope you can find it.

Take a look here, might be good enough. You can copy and paste to Excel and then remove the character “” to make it readable:

http://www.revitapidocs.com/2015/4155880c-f243-3456-fbb8-542c8f8ad692.htm

2 Likes

Hi @Sergio.Ramirez2,

Clockwork package has already the node UnitType.DisplayUnitType but it doesn’t do exactly what you need.
The API allows to extract the possible units in Revit.

In the picture above, the HVAC airflow is on line 17 and you can see all the possible units.

Here is the python script for reference :

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager

# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
import System
from System.Collections.Generic import *

groups=[]
unitSymbTypes=[]
dispsyms=[]
dispunits=[]

units = UnitUtils.GetValidUnitTypes()
for unit in units :
	group=UnitUtils.GetUnitGroup(unit)
	groups.append(group)
	dispunit = UnitUtils.GetValidDisplayUnits(unit)
	dispunits.append(dispunit)
for dispuni in dispunits :
	for dispun in dispuni:
		unitSymbType=FormatOptions.GetValidUnitSymbols(dispun)
		unitSymbTypes.append(unitSymbType)
for unitsymbol in unitSymbTypes:
	for unitsymb in unitsymbol :
		if unitsymb == UnitSymbolType.UST_NONE:
			dispsym = None
		else:
			dispsym = LabelUtils.GetLabelFor(unitsymb)
		dispsyms.append(dispsym)
				
OUT = units, groups,dispunits,unitSymbTypes,dispsyms
1 Like