Revit railing enhancements with Dynamo

Lately I’ve been working on some Revit railing enhancements. This is still work in progress, but some of the Dynamo nodes are already available online in my updated Zhukoven.com (rev.2017.8.17) package. Below you can see available railing Dynamo nodes (please note that currently all of these nodes support only one railing instance at a time):

Railing.CalculateBalusterProfile

RailingBalusterProfile

Currently there’s no direct link between the railing element and its hosted balusters through the Revit API. So in order to get the baluster profile data, we have to explode railing geometry and extract surfaces. Output values are diameters / widths of baluster elements.

Railing.CountBalusters

RailingCountBalusters

This node calculates the number of railing balusters. See this post that explains the logic: Count railing balusters in Revit with Dynamo

Railing.GetHost

RailingGetHost

Check if the railing element is hosted, and get this host element as an output (if applicable).

Railing.GetPath

RailingGetPath

Get the list of lines that form the railing path.

Railing.GetTopRail

RailingGetTopRail

Get top rail element (instance) from the input railing instance.

Railing.TypeInfo

RailingTypeInfo

Input railing instance to get its type, primary handrail type, secondary handrail type, and top rail type. The node returns null values if selected railing type doesn’t contain handrails.

Download an updated package (rev. 2017.08.17) from: Zhukoven.com

Dynamo deletes previously placed elements after each run – workaround

If you need to iteratively place multiple Revit elements with Dynamo, like these stadium chairs, then you are in trouble. The problem comes from element binding – a Dynamo feature which preserves the link between DesignScript and Revit elements during the current Dynamo session. This is how Dynamo works by design, preventing your model from an avalanche of element duplicates, created in ‘Auto’ mode:

DynamoBindingOn

Either you run the graph in ‘Auto’ mode (like in the figure above), or re-run the graph manually, Dynamo places new elements while removing previously created ones. This kind of behaviour sounds pretty logical and straightforward – look what you’ll get if there’s no element binding at all (using one of the workarounds):   Dynamo deletes previously placed elements after each run – workaround