Hi,
I have a problem with the conversion of units in revit 2022. In revit 18.3 (i know its old - im new in dynamo :/ ) im using expression like this:
"
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import DisplayUnitType, UnitUtils
# output unit
dut = DisplayUnitType.DUT_CENTIMETERS
OUT = UnitUtils.ConvertToInternalUnits(IN[0], dut)
“Ostrzeżenie:IronPythonEvaluator.EvaluateIronPythonScript operacja nie powiodła się.
Traceback (most recent call last):
File “”, line 4, in
ImportError: Cannot import name DisplayUnitType”
I have to convert units to centimeters to get surrounding elements for doors (like concrete beams), tolerance is 5 cm.
I know “DisplayUnitType Property Resource Not Available for the Active API Year” (2022), but maybe someone had the same problem and find solution.