Sorting the element instances by room

Hello Dynamo enthusiasts!!! I am trying to sort all electrical fixtures by room, but unfortunately the room boundaries are out of “actual room” (as you can see in the picture). Could somebody help me to solve this issue?

EDIT: The architectural model is a linked file

Could you also post details about your project base point, both Electrical and Architectural? @vc98BY9

Looks like you need to apply the transform of the link to your geometry as the hard coded internal origins do not align.