Get elements in room

Hello,

I’m trying to get a list of lights by room.
I have a file with all the lights and the architecture model linked to my electrical model.

i made a simple script but it’s not working well and i don’t know why.

i made an extraction of my rooms in the linked model and i select the lighting from my electrical model, the i use the node “Elements From linked File in Room” but exemple:

i have 10 fixtures in “room 1” but it’s saying that the 10 fixtures are in “room 10” not in “room 1”.

Maybe anyone know whats happening?

Is the image showing something different than the example you describe?
From the image it looks like “room 1” (index 0) has 7 lights. To me it doesn’t look like anything is going unexpectedly in your graph. The list of lights seems to be neatly grouped by room index and you’re assigning the respective room name to “EM_ELE_XX_Type de Local” parameter of each of those lights, from what I can tell. Is this not what you want?

1 Like

could u tell me which package “Elements From Linked File In Room” belongs to? :pray: @D.BESSON

Actually my problem is that in the Index 0 there are not 10 lights, there are 15 so it’s like the number and type of lights doesn’t match the room name.

I thought it was a problem with the rooms in the architectural model but i verify all the rooms and they are ok.

Do i don’t know what to do.

It is an node from Archilab package

Thx!

not sure if it’s the reason but this node requires rooms in the current model as input?:face_with_raised_eyebrow: ur rooms are from a linked file?
image

Oh! maybe that i have to do it’s link the lights model to the architectural model and not the inverse!!!

Perhaps :face_with_raised_eyebrow:

Hi Daniel,

For linked rooms use Elements in Room node.

2 Likes

Hello Alban,

I stille getting the same problem,
in tne Index 32 there is the “pâtisserie” and the node it’s giving me the lights from the Parking 0 so when i run the script all my lights in Parking 0 have the name of Pâtisserie.

I think there is a problem with the architectural model, because index 0 it’s correct “salle blanche” 6 lights and the type it’s correct.

Verify that the rooms are at the right place in the architect’s model and that their heights are correct (that their limits do not exceed on the floor above)

Room Bounding must also be ticked on the architectural model.

Room%20bounding

1 Like

Thanks a lot! i’ll verify all that to see if that works!

Hi @Alban_de_Chasteigner just a question. If your project internal point differs about linked rooms model, the node ‘element in room’ doesnt work property right? How do you achieve that? I usually get the bounding box to cuboid of the room and transform that geometry to work: location of a host element to intersect with that transformed geometry of the room.

Yes, there are several workarounds.
You could also probably use the coordinate transform of the linked document.

1 Like

Hello. How to get “Piéces” in Categories node?
image

Pièces in French is Rooms in English

i am getting an error from the Elements in Room node that ther is an error in the line 70 code. can someone help me on this?
Assign Rooms to Fab Pipework Parts linked models.dyn (14.1 KB)