blueprint and static mesh sockets

So im trying to make a modular building thingy and i want to do that with a blueprint

the building has empty window frames and i want to fill those using the construction script, but i cant figure out at all how to set a window to any of the sockets i have made for the static mesh, i have tried a bunch of different things but the window just keeps in the center of the building.

pic:

Does your window maintain its original position after being attached to the socket? If so, you would need to set the window’s position prior to attaching. Also, if the building never moves, there is probably no reason to attach the windows at all.

EDIT: Something like this:

I would imagine a line trace isn’t the most optimal way to create it, but I did it just as an example. You would obviously want some system in place to prevent you from spawning more than one window inside each frame.

Get Nearest Socket and Location function:

Well the general idea is 2 cases

  1. when placing the blueprint of the building in the scene, i can manually select by having window sockets exposed as parameter that i can assign different window types to
  2. in game the player can change the window type while standing near it

edit: ive changed it up a little, i made a separate actor blueprint for the windows so i can select what type they are, but for the life of me i cant figure out how to add them to the building blueprint with the construction script…

By that, do you mean you want the building to start off with some of the windows blocked off?