I want to get the value of the dimension type parameter : Dimension Line Snap Distance: in this case it is 6mm
But i get a wrong value (0.0196850393700787) Why?
see pictures:
I want to get the value of the dimension type parameter : Dimension Line Snap Distance: in this case it is 6mm
But i get a wrong value (0.0196850393700787) Why?
see pictures:
Dynamo is giving you the value in feet.
Thank
I thought about inches but that was not right
Never thought about feet
You could use this method to get dimension values as Revit if your project is in mm:
import clr
clr.AddReference('RevitAPI')
clr.AddReference('RevitNodes')
from Autodesk.Revit.DB import DisplayUnitType, UnitUtils
from Revit import Elements
dim = IN[0]
# param
val = []
# output unit
unit = DisplayUnitType.DUT_MILLIMETERS
for d in dim:
item = d.GetParameterValueByName('Dimension Line Snap Distance')
val.append(UnitUtils.ConvertFromInternalUnits(item, unit))
OUT = val
Thanks it works