There are two general methods for achieving the effect to the right.
Method 1
Create the wall with a filled polyline around the entire perimeter of the building, and then "cut out" the battlements and windows with white filled polylines.
Method 2
Create the wall with a filled polyline section between each battlement.