# Distance between point and surface above

Hey,

I’m entirely new to dynamo and could use some help to understand why my code wont work. What I am trying to accomplish is to define a point on my plan (in my case I tried with a spot elevation), and to be given the distance to a surface directly above it, for example a ceiling with complex geometry or a beam.

I don’t need all the fancy graphics. I just need to know the height above of multiple points in a plan. So I had the idea of using the same method with a raybounce, originating at a spot elevation instead of the staircase steps in the example, but it isnt working. Any ideas as to why, or how I could accomplish this in another way?

All help appreciated.

Hey, it looks like you’re not too far off…

Have a look at this:

I think you’d be better getting a room location rather than a 2D (view specific) spot height.
You’ll want any 3D view which shows the room and the ceiling/roof to plug in.
When you get the points you’ll probably just get the distance between 2 points, Hot Gear and GIS2BIM have that node.

Hope that helps,

Mark

Edit: Like this… I was a bit wrong, only certain 3D views will work and I couldn’t see the logic for which… And you need the list deconstruct. I obviously did this from a floor plan, but you could do it for more if you wanted, though it will start to get very slow…

It’s not working as you haven’t defined all the inputs for the ray bounce. Add the default 3D view for the view (or better yet a simple version thereof). Also, you want Vector.ZAxis for the direction, not Vector.Z.

Another option would be getting all elements of category for your desired categories, building their geometry via Element.Geometry, turning those into one unioned solid, and doing a Point.Project method to find the point directly above each point, and then getting the distance between the two points.

1 Like

Thank you so much. Thanks to you its working now. What was asked of me was spesifically to define certain points, so thats why it ended up the way it did. Here are two pictures.

Now I need to figure a way to add the numbers with the project elevation and maybe a nice way to display it next to each line, but I will see if I can handle that alone.

Cheers

If you’re keen to use spot elevations, you might find this useful…

1 Like

Thanks a bunch! That came in use for the next step. This is the final result if anyone is interested, with a family etiquette in revit which shows ceiling height above etiquette and height above survey point of the project.

1 Like