Revit railing path

Hello,

The ‘Add Railing’ component requires a Curve as input, but is it possible to do it the other way around? To extract the path from an existing Revit railing element? Similar to the ‘Analyze Wall Location Curve’ component.

Thanks! :slight_smile:

Best regards,
Christian

Hi Christian,

You can use a Category on the Element Dependents component to get the Sketch Lines

The latest daily build will cast directly from a railing to a Curve.

Hi Japhy,

Thank you! I downloaded the latest daily build. This method works great! :slight_smile:


Is it possible to get the curve path of a stair railing? Currently I get the flattened plan view, but I’m wondering if it’s possible to get the rail actual path like this

Hi Diana,

There is a Railing Rail Extension Path that availailbe if you dig deep enough…

Rir-R8-RailPath.gh (9.7 KB)

This is perfect, thank you!!

Is there any way to extract the original profile used for the rail?

The profile is a Type Parameter of the Railing.

Is there a way to extract the path for the additional rails and balusters from Revit to show up as lines in Grasshopper, the same way that has been done for the top rails?

Hi Diana Ofcg,

Correct, but unfortunately there isn’t any linework available for those elements.

Is there an alternative way to pick-up the category highlighted

I’m having an issue when loading different Revit files to test the script, the ‘Value Picker’ is resetting and losing the original selected value. It seems like it’s a known issue -

When the dialog is static it will remain selected. If its being populated via a dynamic project specific list its not going to remember the selection.

It seems that there’s an ID associated with the specific categories, like the -2000954 for Lines/Railing Rail Path Extension Lines, is there a way to reference that number directly instead of using the value picker?

In a way, I need a static pre-selection instead of a dynamic one

The negative number indicates a built-in category / subcategory

Those numbers do not change per project, so you could create your own value list / list

Thank you Japhy, that’s exactly what I need!

Hi,

I’m working with a Revit file that contains a large number of pipes, and I’m trying to extract the centerlines. For elements in the Pipe category, retrieving the centerlines is straightforward. However, I’m having trouble doing the same for elements in the Pipe Fitting category.

Here’s the workflow I’m using:

  • Category Picker (with “Pipe Fitting” selected)
  • Category Filter
  • Query Elements
  • Element Geometry

The geometry output gives me Closed Breps, not curves.
When I connect the result to Element Dependents, I see the following in the output:

  • Dependent: Revit Geometric Element: <Center line> : id 1089068
  • Category: Revit Category: Pipe Fittings | Center line : id -2008072

This suggests that the centerline exists as a dependent element, but I’m not sure how to extract it properly.

How can I retrieve the centerline curve from a Pipe Fitting?

Thanks in advance for your help!

Hi @amaraa,

You can try something like this

Hi @MSAwan,

The Wires output from the Element Preview shows circular outlines at the ends of the fittings, rather than the result shown in the second image you posted.

Based on this, I’m assuming these fittings were created using a different method—possibly without a centerline—using a bending radius and a circular pipe profile.

At this point, I’m looking into the outputs from the Element Location component, since it provides some vector data that might represent the bending center or the fitting’s plane.

Revit files are turning out to be much more complex than I expected, with layers of categories, families, and types. I really wish it were as straightforward as working with Rhino geometry.

Hi @amaraa,

are there only two curves coming from the output?