I have a problem with Space Parameters.
I would like to get parameter values of “Design Heating Load” in Dynamo.
As you can see from the picture below, the Space OFFICE 01 has the parameter “Design Heating Load” equal to 237 W.
There have been some improvements in Dynamo recently with units- such as length, volume etc
But it seems this parameter is being reported in different units
I have an idea that the Lunchbox node reported it in current units- but it doesn’t seem to work.
It should be pretty easy to convert the reported value to correct units
@Kulkul is right , AsValueString will get your aroud the unit conversion issues. Revit internally works with some units that can not be changed.
You could also use the following code if you’d like to run conversions from/to the internal units:
import clr
clr.AddReference('RevitAPI')
clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
#Getting Document UI Units - you nedd to precise the unit type, here it's lenght
UIunit = Document.GetUnits(doc).GetFormatOptions(UnitType.UT_Length).DisplayUnits
#Converting Input to internal units to user interface units
convertto = UnitUtils.ConvertToInternalUnits(IN[0],UIunit)
#Converting Input from internal units to user interface units
convertfrom = UnitUtils.ConvertFromInternalUnits(IN[0],UIunit)
OUT = convertto , convertfrom