Thermal Conductivity Unit

Hello,

I have extracted the thermal conductivity value from materials in a Python script in Dynamo but it extracts this value in a strange unit. It’s not in the SI units (W/m.K) but I can’t figure out in what unit it is.

Anyone know the internal unit that Revit use for Thermal Conductivity? I know they use some strange units but I have not found it for this parameter.

Thanks

Hi @Ninot,

I don’t know the specifics about the unit type, but have you tried converting the units from internal units to the units you are after? You can use methods from the UnitUtils Class:

http://www.revitapidocs.com/2018.1/e70d4936-ecf2-dfbf-8caf-aac5d6a78d36.htm

So you’re probably looking to use the ConvertFromInternalUnits() method which will take the value you are extracting and an enumeration member from here: http://www.revitapidocs.com/2018.1/7d3d3306-a4c2-c577-0aeb-cca42d6cfd2f.htm as parameters.

Hope it helps.

Thx @MartinSpence !

I follow your advice and I use a Clockwork node but unfortunately my values are null (see image below)

Do you know where it is wrong?

Are you extracting those values as strings?

Personally I would do the conversion inside the python script, but I also have to say, that I haven’t dealt with that unit type before :slightly_smiling_face:.

But if you share the script and a dummy rvt file, then I’ll take a look at it a bit later, if it still isn’t solved.

I don’t know if the script extract values as numbers or as strings…

I tried to do the conversion inside the python script but I failed to do it.

Here is the python script :

An here the rvt file I use
exportexcel.rvt (1.2 MB)

Excellent. I’ll have a look tonight :slightly_smiling_face:

Hey @Ninot,

I created an insulation material named Insulation 0,019 with a thermal conductivity value of 0,019.

import clr

#Import the Revit API
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *

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

#Reference the active Document and application
doc = DocumentManager.Instance.CurrentDBDocument

#Start scripting here:
mats = [UnwrapElement(i) for i in IN[0]]

name = [i.Name for i in mats]
output = []

for i in mats:

	tcid = doc.GetElement(i.ThermalAssetId)
	if tcid == None:
		output.append('No PropertySet Element')
	else:
		tc = UnitUtils.ConvertFromInternalUnits(tcid.GetThermalAsset().ThermalConductivity, DisplayUnitType.DUT_WATTS_PER_METER_KELVIN)
		output.append(tc)

#Assign your output to the OUT variable.
OUT = name, output

Woow thank you very much @MartinSpence !

And just out of curiosity, where does Dynamo find this value and why is it in a strange unit? Because in the material properties, all the values are mainly in SI units. Is there not a way to extract directly that value?

If this value was obtained through nodes, then the value should be returned with with the same unit type as your document, but since you go through the API, it will always return built in Revit units, which is imperial.

That said though, it sorta confused me when i was checking this last night. I tried to run the output through various online unit converters, but none of them returned the same value as Revit. It was late, so i gave up since the script retuned what i was after :stuck_out_tongue_winking_eye:

Perhaps someone with more knowledge about thermal conductivity and imperial units can chip in? :slight_smile: