Coefficient K from Pressure Drop Report

Hello again,

I have to get the Coefficient K, that can be seen on the pressure drop report.

Is this an excel file?

HTML, but can be a .csv file

Could you send a screenshot of what you tried in Dynamo?

Perfect. Archi-lab_Bumblebee has fantastic nodes for reading excel documents. If you’ve given that a try, post your workflow so we can take a look.

1 Like

Well, I just tried the “element.GetParameter…”, but “Coefficient K” is not a parameter… soo yeah, I’m dumb

Try this one maybe:
http://dictionary.dynamobim.com/#/Core/File/CSV/Action/ReadFromFile

There is no way to get it without the csv?

Did you also see this conversation?
http://dynamobim.org/forums/topic/using-dynamo-to-selected-element-ids-via-a-html-file/
Optionally, this package could give additional clues on how to proceed with HTML files:

@willian2142 Here you go…
image

1 Like

@willian2142 Please try something and send us a screenshot clearly showing your issues if any.
Here are two more links that could help:

http://dynamobim.org/forums/topic/reading-csv-from-webpage/

1 Like

I’m not really familiar with pressure loss reports but this might be of help:

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
#The inputs to this node will be stored as a list in the IN variables.
if isinstance(IN[0], list):
	fittings = UnwrapElement(IN[0])
else:
	fittings = [UnwrapElement(IN[0])]

result = []

for x in fittings:
	connset = x.MEPModel.ConnectorManager.Connectors
	kcof = []
	for c in connset:
		kcof.append(c.AssignedKCoefficient)
	result.append(kcof)

#Assign your output to the OUT variable.
OUT = result

This will retrieve the assigned K-Coeffiecient for every connector in the pipe fitting

2 Likes

it’s not working.

This could help:

But this doesn’t get the correct value, it’s always zero. That’s why my question is about the pressure loss report, because revit makes the correct path, like lateral or direct flow, and I can discover it by excel formulas.

This discussion could help clarify the issue a little:
https://forums.autodesk.com/t5/revit-mep-forum/custom-k-factor-calculation-for-pipe-fittings/td-p/6350133
The PipeKFactors.xml file should be in the Program File Revit folder.