Flip Railing - Node?

Hello,

I’d like to ask if someone has encountered a node that performs a function based on the following method from the Revit API?

Railing Methods - Flip Method - Flips the railing.

https://www.revitapidocs.com/2020/ad8cbb52-9732-6aaf-1187-1731f6116e81.htm

Cheers

Hello @Sa_60,

You can use a little Python to do this, as follows :slight_smile:

import sys
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

railing = IN[0]

if not isinstance(railing,list):
    railing = [railing]

results = []

TransactionManager.Instance.EnsureInTransaction(doc)

for rail in railing:
    try:
        unwrappedRail = UnwrapElement(rail)
        unwrappedRail.Flip()
        results.append(unwrappedRail)
    except Exception, ex:
        results.append(str(ex))

TransactionManager.Instance.TransactionTaskDone()

OUT = results

Sa_60-RailingFlip.dyn (4.1 KB)

5 Likes

Hello @solamour ,

Please excuse me for a the delayed reply.

This script definitely does the job for me. Its exactly what I needed.

Thank you for the response and the effort.

Regards

1 Like

No worries - I’m just glad it solves your problem! :smiley: