How to get a polyline or surface located in centerline from Revit Wall

What is the most efficient way to get centerline from Revit wall so I do not have a closed brep with thickness but polyline or surface located in centerline, for floor and roof I need from the outer elevation?

Hey @michaldengusiak

Use the python node in the attached files. There are two python nodes

This node gives you the wall base curve, adjusted by the Wall Location Line

2019-12-16 11_17_40-Grasshopper - wall location line

And this one provides the base curve alongside all the location info, in case this info might need to be used in other parts of the definition

An issue has been filed on the repo so you can track the progress.

wall location (9.6 KB)


@eirannejad thanks a lot, seems like you and Rhino 7 will become my good friends :slight_smile:
ok, I did detailed tests and can not get it to fully work. However, I prepare a test case for you.
I am using Revit 2020.2, I am using my standard SAM template which is small enough but covers most of project cases…
ps. let me know where should I do posts like that here, here or on Github?

Here is a model with isolated categories:
select one wall and click “IC”

  1. When I take the first wall,
    I can see pulled element but unable to see location line?
    how to make it visible in Rhino?

  1. Next wall is not visible

  1. can we internalize Revit element so I can send you only GH node?

Here is attached .zip with Revit and GH definition I am using.
2019-12-16 (15.3 MB)

I spent a bit time on this and now understand nr 2,
issue is with units I guess you are pulling internal units feet, so we have to scale it back to meters…and also change Rhino units to meters

I’m installing my 2020.2 to take a look at your model. The python script however is using Revit’s native API to pull the wall location curve, and the offset to base curve. It should be agnostic to the model unit configurations as the API does its math differently. Does the location line curve preview correctly in Revit interface without the scaling adjustment?

not is not agnostic,
so my problem was that initially, I open Rhino in mm and not realized that every time need to change to m
so I can see location line in Rhino, but to get correct scale need to do feet to meter.

ps. My template in Revit is in milimeters


yes I can see preview in Revit… but need to get it to scale to get the correct location

Thay’s odd. I just opened your model in Revit. And opened Rhino with Large Objects - Feet.3dm template. Wall curve shows correctly in both apps.

2019-12-16 15_32_56-Rhino WIP

It seems like as long as the correct template is used in Rhino, the definition should work

yes because you open in Feet this is default Revit unit,
in Europe we use meters, please see what happens if you open Rhino in meters.
How I can fix Rhino to open with specific template?

See this discussion