I am trying to get all the stairs within a multistory stair. I’ve written a Python script but it is not returning all the individual stairs. I think if a stair has the same floor-to-floor height they must be grouped and only one instance is returned using the GetAllStairsIds command. There looks like there might be another command MultistoryStairsId but I’m not sure if this will do what I need it to do. Any thoughts?
import clr clr.AddReference('RevitAPI') from Autodesk.Revit.DB import * clr.AddReference("RevitServices") import RevitServices from RevitServices.Persistence import DocumentManager doc = DocumentManager.Instance.CurrentDBDocument stairs = IN #if not isinstance(stairs,list): stairs = [stairs] def getRuns(stair): runs =  stair = UnwrapElement(stair) runids = stair.GetAllStairsIds() for run in runids: runs.append(doc.GetElement(run)) return runs OUT = map(getRuns, stairs)