Is it at all possible to extract the values of multiple Spot Slopes? I have tried but no joy.
Hi last time i tried direckly from a slope dimension i need get the dimension host for, that, and depends which element example for a floor and if it made by slope arrows or not…maybe just me
what kind of element is it ?
A floor
I shall check this out. Be back shortly.
which unit is your slope value in
Ratio
allright guess mine was in degree, just convert it i guees, just a formel or try unit converetr node…or try here see if it could be better
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
results = []
for element in (IN[0] if isinstance(IN[0], list) else [IN[0]]):
elem = UnwrapElement(element)
doc = elem.Document
floor = doc.GetElement(list(elem.References)[0].ElementId)
sketch = doc.GetElement(floor.SketchId)
for dep_id in sketch.GetDependentElements(ElementClassFilter(CurveElement)):
dep = doc.GetElement(dep_id)
h = dep.LookupParameter("Height Offset at Head")
t = dep.LookupParameter("Height Offset at Tail")
if h and t:
dz = abs(h.AsDouble() - t.AsDouble())
run = dep.LookupParameter("Length").AsDouble()
results.append(round(dz / run, 4))
break
OUT = results
yes guees works great here… *degrees to slope ratio is Tan(θ)100 : 100, if you have a small sample where it fail, then you are welcome to share that one and we can take a look
I reduced the number of spot slopes down to 4 and nothing returned. ![]()
Thank you for your time. Much appreciated. A classic situation of Dynamo not playing ball.
arrh as mention it will depends on how the floor is created guess yours have slope point right?
yeah point based, dont think its so simple so,maybe we can find out which face they belong to but absolutely not sure,havent tried, or maybe we can find someting via ifc export, but not sure at all,maybe @c.poupin have an idea
ps get an idea there maybe could work havent tried just a crazy idea
, gues we can get the element boundingbox from slope dimension and then the points from there and project on floor surface then we could calculate the slope, perhaps…just a stupid undocumented idea
![]()
This is a great example of why a sample RVT file with a similar floor (and in the same version) might help here, as otherwise people have to first guess which Revit version you’re in, then guess how your floor was built, then guess how your elevation tags were created, then guess your unit formatting, then author the script to return the result.
If any of those guesses are wrong there is a change that the script produced won’t work, causing things to have to start over.
Based on your plan above, my first idea would be:
for each blue line, I would calculate the projection points (ends of the line) onto the ground using ReferenceIntersector, then I would calculate the slope




