Windows/Doors data based on Rooms from linked file

Hello everyone,

In my office we have a project which we splitted into two central files.
The first one is for the Facade, and the second is mainly for everything else; including Rooms.
For the rooms in the main central file, I’ve created a Text parameter which has values,
And in the facade file, I created another parameter “Text” as well for the windows; which is empty so far.

Now I need to create a definition which could read the Text value from the main central file (which is inside the Rooms category), and pull it directly to the Parameter in the Windows category in the facade file; based on the relationship between each window and its room from the main central file.

I tried many techniques (based on my very low knowledge of Dynamo), but I couldn’t reach the goal since the main problem is that I can’t tell Dynamo which window exactly related to which room.

I hope if anyone could give me some thoughts,
Thanks a lot in advance.

Hi @Ahmad_Saad

Here’s a proposition :

You might need to transform the geometry of the bounding boxes in case your project has a special orientation …

Hope this gets you closer !

1 Like

Thank you @Mostafa_El_Ayoubi for your reply.
I tried it out; but unfortuantly it keeps giving me “false” list, as if there is no intersection between the Windows bounding boxes and the rooms bounding boxes.
Please find attached:

@Mostafa_El_Ayoubi Hi again,
So to fix this; I thought about “re-locate” or move the points (windows/doors) a little inside the rooms, like this I will generate intersections between each door/window and its room host.
I used the CoordinateSystem.Scale node to do that,
Please find attached. Please let me know what do you think.
Thanks again

I think it’s a good idea ! You can use the offsetted points instead of the family location point in the previous script .

@Ahmad_Saad @Mostafa_El_Ayoubi You can also use clockwork package “Room.InertsofBoundaries” to retrieve Doors and windows in link file.

2 Likes

But - unless I misunderstood - the doors are not in the same revit model as the rooms

@Ahmad_Saad In that case another possible way is to use “Tool.GetSurroundingElements”.

4 Likes

Thanks @Kulkul for your reply!
What is your suggestion to fill windows’ specific parameter with the values coming from the room’s parameter?
For example I want to fill the Mark parameter inside the windows list, with the name of its room. Of course through the linked files.

Thanks @Mostafa_El_Ayoubi, unfortunatly it didn’t work perfectly as I wished, I have around 2800 rooms and more than 2500 windows, and when I offset the windows’ points, it goes far from its room center, which means that it won’t intersect with the room bounding box.
I still don’t understand why when I applied your technique it didn’t work with me :smiley:

I would suggest you create new parameter (From Room) for windows and then apply the values in it.

Thanks!
Could you please show me that by an example? Thanks in advanced :slight_smile:

Just went back again to this task after a while, and I found that it was kind of easy now.
Here is a screenshot for the method, just in case if anyone needs it:

Thanks for your replies, you were very helpful !

1 Like