Windows placing by python code

3 4

i tried to place window on wall in python but window is on ground , not in middle of wall . As i am not placing windows on specified points so that i could give Z to point and place window over that . In this case what should i do in code so that windows comes in mid of wall , not on ground

Set the parameter for Sill Height to the proper value.

thanks peter and i need one window on every wall , here i took just one wall but if i give it many walls and want window on every wall . what should i change in the code

In your python, you need to set Sill Heights as an input so you can control them. Here is a link to the API so you can hunt down proper language for the sills. http://www.revitapidocs.com/2018.1/