The simple answer is with difficulty. A window (or door) can only be placed in a WALL. So the only way to do this is by ‘calling’ the window using the objects script. BUT this will only work graphically because the result will not be neither an wall nor a window. It will be an object.
Why do you want to do this? what is your workflow?
I’m trying to create a system of objects for a prefab building system, where instead of using the usual wall/floor/roof elements, objects can be inserted into the model that represent the modules of the prefab system.
If you could simply place windows into the wall objects, that would be a really great way to build the model.