Placing 3D electrical boxes by host

Hello,

I’m having trouble with placing 3D electrical boxes in a wall.
The idea behind the script is that dynamo search for a family type that is hosted to a wall. I will use the coordinates for placing the 3D electrical boxes. the problem is that they need a host before I can place them. for 1 box the script is working. When i put multiply boxes on differente surfaces he can’t find the right surface. does anyone have a idea how I can do this? I’ve put a revit file (2022) and the script in the link below.