Getting floors in space

Greetings everyone !
I’m trying to get the floors of each space of my model with the elements in space node but i keep getting a location object has no curve attribute error therefore i cant get the creation phase of the flooring like shown in the screenshot below ! i’m using Revit 2020 and dynamo 2.3 ! Any solutions ?!

Thanks for your kind help sir !
But after reading the post you linked creating polygons with the polylabel algorythm kind of replaces the wanted floor with a polygon and gets the centroid of the polygon but in my case i want to select the floor element itself so i can get its parameters ! If i’m corrcet replacing the floor element with a polygon wouldn’t allow me to get the floor parameters !

I think you need to work with concurrent lists. You have one list of floors and one concurrent list of floor shapes. You use the list of floor shapes to get centroid points and use Archi-Lab package node Get Space At Point to find a space for each floor in the concurrent list. I am sorry I am not able to do a simple script now I am on holiday and not at computer.

An alternative method might be via using Bimorph package clash detection nodes. You can find which rooms clash (i.e. intersect) with which floors.

Edit: I don’t think you can get this from a built-in floor or space parameter.

Thanks for your answer Sir
Your metheod worked fine at identifying which floor belogs to which space but i couldnt get a list of the floors construction phase following which space they belong to ! I tried to use rooms instead of spaces and the room.boundaries node to get the floors and cielings this works ! but i have another task on this project which is collecting all the elements in the rooms so its a bit complicated ! i guess i have to alter between rooms and spaces ! i cant think of another solution ! thnaks for your help though =)

Hi again =)
I managed to get the centroid points of the 8 floors present in my model using a method i found here on the forums but i couldn’t get the space at point node to work like shown below ! Am I missing something here ?

Error message on Space at point node : “Warning: Internal error, please report: removal of the reference of a non-pointer element.
Select.SpaceAtPoint the operation failed.
The call is ambiguous between the following methods or properties: ‘Revit.Elements.ElementWrapper.Wrap (Autodesk.Revit.DB.Material, bool)’ and 'Revit.Elements.ElementWrapper.Wrap (Autodesk.Revit.DB.Analysis. PathOfTravel, bool) '”

Well I finally got it to work ! It seems if you can get the boundingboxes of the spaces and get the elements inside the boundingboxes withe the Bimorph package node @simon_murphy1 suggested Boundingbox.GetElementsInside you can get the floors and ceilings of each space perfectly ! here is a screenshot of how i managed to do it

1 Like

Hi,

For information, another method without boundingbox :
space to element

3 Likes

Works perfectly too ! Thanks for sharing @Alban_de_Chasteigner