I’m trying to get a stair’s railing path. I have a Python script which works for a single stair but it doesn’t work for a list of stairs. Any ideas on how I need to modify it? Sorry I’m a Python noobie…
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
curves = []
railing = UnwrapElement(IN[0])
rpath = railing.GetPath()
for i in rpath:
curves.append(i.ToProtoType())
OUT = curves
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
curves = []
railing = UnwrapElement(IN[0])
for r in railing:
step2=r.GetPath()
for s in step2:
curves.append(s.ToProtoType())
OUT = curves
Paul, I am curious why you were trying to grab the path… can you share what you’re trying to do? I cam e across your question because I’m trying to automatically place a volume (to act as a height clearance, no fly zone)…
I was getting the railing to work out the clearance between handrails. If you want to calculate the head clearance, you’ll need to get the treads and nosings.
I know what the required head clearance is, but in this case, since we work as part of a multidisciplinary team, we try to create 3D clearance zones to tell other disciplines to keep their pipes out of these areas…
Marcel, no I haven’t seen it. Thanks for sharing. I think we are going for something different though… When I get around to it, I will use the python script extracting the path of the railing to automate drawing draw another face based massing volume…we want to visualize a no fly zone so that other disciplines don’t route their pipes within the head clearances allowed (typically 6’8" min.)