albandechasteigner / GeniusLociForDynamo

Genius Loci is a package of 350+ custom nodes for Dynamo in Revit.
MIT License
43 stars 9 forks source link

Nearest Building Story (Nearest Level.dyf) #33

Closed MennoMekes closed 5 months ago

MennoMekes commented 5 months ago

Hi,

Is it possible to add an input that let's you in-, or exclude Levels that are not a Building Story?

albandechasteigner commented 5 months ago

Hi,

The method used comes from the Revit API and doesn't offer the possibility of excluding levels which are not Building storey. But it is possible to achieve the same result with a few lines of codes : var levels = new FilteredElementCollector(m_doc).OfClass(typeof(Level)).Cast().Where(x => x.get_Parameter(BuiltInParameter.LEVEL_IS_BUILDING_STORY) != null).OrderByDescending(lev => lev.ProjectElevation).ToList() rest of the logic ...

MennoMekes commented 5 months ago

Thanks!