How can I write a Dynamo script so that when I create floors inside rooms, the floor gets (and shows) the correct Room Name and Room Number of the room it belongs to?
I’ve tried several approaches but haven’t had success. Has anyone done this? If so, could you share a screenshot of your Dynamo graph/script?
Hi Pharpoom, welcome ![]()
I’m not sure what you are trying to achieve - are you trying to add room name and number data to a floor element?
Floors elements generally are not related to a room as structural floors and even finishes may be across multiple rooms (such as carpet through an office). Typically the floor finish is stored in the Room instance ‘Floor Finish’ parameter.
So are you looking to automatically find the floor finish associated with a room and update that parameter? This can then be displayed in the Room Tag
If you haven’t done so, please review the following post → How to get help on the Dynamo forums
You could collect all the rooms and see if they intersect/touch with a floor, extract the floor type data and update the Floor Finish parameter. Search the forum for examples and give it a try
I’m Sorry for confuse communication. I want to add information in room schedule for prepare floor data such as Finish floor Level offset and I added shared parameter “Finish Level Manual” for fill offset height. After that I Create dynamo script for copy and link “Finish Level Manual” assign to parameter “Height offset from Level” of floor. Next, I create Shared parameter “Room Name” assign in floor category and run dynamo for link information room parameter “name” to “Room name” in floor category that work. But problem is when I create floor in room the room name of Room and Room name parameter does not correct. In the picture I created floor in room fff but in Room name (shared parameter) show room bbb. I think floor can’t match in true room location. I don’t know to created dynamo script for solve this problem. If you know please share me the dynamo script or picture script path. I will follow your way. Thank you very much for your help.
You are just pulling a list of all rooms and pulling a list of all floors. You need to sort and filter these lists so they are aligned like a relationship.
You can do this in multiple ways. But I am curious if you want to create the floors with the script or simply want to match already existing floors to the correct room.
Thank you for your help. The problem is I want to create a room schedule and add information of room number floor level and ceiling level offset from floor before create a real floor and ceiling model. So I create a blank room schedule and add room number and information as above. And when I create model and pick the room in to model and run script first time in the picture is work, But when model need to revise adjust room location, when I move or remove room and add to a new location sample in room 101 I add information before when plan change I move room to another space and modify floor and ceiling in to a new space but information in room 101 does not match in the true room 101. In my mind I think floor and ceiling have origin point for specific in room like room calculation point in family but I don’t know how to create dynamo script to solve this and when revised model the room schedule can show the true information in the model.This is my problem if anyone have solution I thank you so much.
This
.
From what i am getting is you want / need to;
- Collect all the
Roomsin your project. - Pull the data from those
Roomsand get theFloorsin thoseRooms. - Push the data back to the respective
Floors.
https://forum.dynamobim.com/search?expanded=true&q=Get%20Floors%20in%20Rooms
To get Floors from Room Boundaries, Archilab and Clockwork.
Things to add / note;
Floors can’t be in multiple Rooms (in other words overlap Rooms).
There is no need for this. Unless it is a preference.
You can push the data from all the Rooms to their respective Floors in one go.
No, they don’t.





