Best way to match MEP Space to his corresponding Room?

Hello,

how can i match Space data to roomdata…

i have one stable Room and Space number but how can filter them correctly …
so that each room got his corresponging Space information?

i man like this

spacenumber == roomnumber ? "GetSpaceSetRoomParameter" : " do nothing"

KR

Andreas

This is just typical filtering. It’s covered all over the forums. You can compare directly and filter for every item or you can create a dictionary with space/room information and use that to return rooms. Spaces also have a Room property that would get you the room directly.

1 Like

@Nick_Boyts ,

Issue is the Number from rooms is not in use…
i have a parameter SpaceNumber (for the IfcExport) that is equial to Number(Space)

grafik

is there a other way to access the parameter ?

altertivly how can i access a “combined” parameter ?

KR

Andreas

@Nick_Boyts ,

So i got this but i am still struggeling to get the right rooms/Spaces


GetSpaceNumbervsSetRoomNumber.dyn (34.2 KB)
KR
Andreas

What do you mean the number for rooms is not in use? Rooms have a number by default. Spaces will read the name and number of the room they are in.

Are you dealing with native Revit objects or are they IFC?

Combined parameters are only in schedules. They don’t actually get assigned to the element so they don’t exist. However, they’re just a combination of other parameters so you can build it on the fly yourself.

What do the errors from your graph say? It looks like you’re using GetItemAtIndex but you aren’t providing indices. I would recommend looking at some topics dealing with matching Excel data with Revit data. It’s the same general process: you have one set of data that needs to be compared with another set of data.

1 Like

@Nick_Boyts

nativ Rooms, and linked spaces… it is a closed BIM Project, BUT the client wishes IFC so i have to map the Space information … arount 30 Parameters from LinkedSpaces to my rooms!

the space creation is based on this SpaceNumber.

KR

Andreas

If the linked space model has the room model linked in then the spaces should have access to the room information. You could use that to determine which room to transfer space data to.

If you don’t have access to that information, then you need to do a manual map, either by filtering or by dictionary, to get the correct space-room pairing.

@Nick_Boyts ,

i thought also in a dictionary like

{M031U2021 : M031U2021},{"RoomNumber" : "MEP-SpaceNumber"} 
#can i filter them like pairs?

You would create a dictionary of {SpaceNumber : [SpaceData]} from your spaces. Then you would use that to lookup the matching SpaceNumber with the room’s Number, returning the associated [SpaceData] for that room.

1 Like